Browse Source

reverted extern c syntax,fixed a makefile problem

wangyu 8 years ago
parent
commit
e890a6344c
3 changed files with 4 additions and 8 deletions
  1. 2 4
      encrypt.cpp
  2. 1 3
      main.cpp
  3. 1 1
      makefile

+ 2 - 4
encrypt.cpp

@@ -1,7 +1,5 @@
-extern "C"{
-    #include "lib/aes.h"
-    #include "lib/md5.h"
-}
+#include "lib/aes.h"
+#include "lib/md5.h"
 #include <string.h>
 #include <stdint.h>
 #include <stdlib.h>

+ 1 - 3
main.cpp

@@ -1,9 +1,7 @@
 #include "common.h"
 #include "network.h"
 #include "log.h"
-extern "C" {
-	#include "lib/md5.h"
-}
+#include "lib/md5.h"
 
 char local_address[100]="0.0.0.0", remote_address[100]="255.255.255.255",source_address[100]="0.0.0.0";
 u32_t local_address_uint32,remote_address_uint32,source_address_uint32;

+ 1 - 1
makefile

@@ -20,6 +20,6 @@ cross:
 release:
 	g++ main.cpp -o udp2raw_amd64  -static  -ggdb -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -lrt -std=c++11    ${FLAGS} ${FLAGS2}
 	g++ main.cpp -o udp2raw_x86  -static -ggdb -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -lrt -std=c++11    ${FLAGS} ${FLAGS2} -m32
-	${cc_mips} main.cpp -o udp2raw_ar71xx  -lrt -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -std=c++11 ${FLAGS} ${FLAGS2}
+	${cc_cross} main.cpp -o udp2raw_ar71xx  -lrt -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -std=c++11 ${FLAGS} ${FLAGS2}
 	tar -zcvf udp2raw_binaries.tar.gz udp2raw_amd64  udp2raw_x86  udp2raw_ar71xx