From e890a6344ccd491f89e45f0d2766890ddc3451cc Mon Sep 17 00:00:00 2001 From: wangyu Date: Fri, 11 Aug 2017 12:25:04 +0800 Subject: [PATCH] reverted extern c syntax,fixed a makefile problem --- encrypt.cpp | 6 ++---- main.cpp | 4 +--- makefile | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/encrypt.cpp b/encrypt.cpp index 4038147..57e2b5d 100755 --- a/encrypt.cpp +++ b/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 #include #include diff --git a/main.cpp b/main.cpp index 7526efd..a44d5be 100755 --- a/main.cpp +++ b/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; diff --git a/makefile b/makefile index 48f5c00..e406b69 100755 --- a/makefile +++ b/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