From 969f794919040d091b14b5e71791360aa5820ce4 Mon Sep 17 00:00:00 2001 From: lnk Date: Wed, 25 Jun 2025 10:48:50 +0800 Subject: [PATCH] fix build --- LFtid1056/build.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/LFtid1056/build.sh b/LFtid1056/build.sh index b666e3f..e7341c7 100644 --- a/LFtid1056/build.sh +++ b/LFtid1056/build.sh @@ -32,12 +32,15 @@ INCLUDE_DIRS="-I$SRC_DIR \ LIB_DIRS="-L$LIB_DIR -L/usr/lib64 -L/usr/local/lib" -LIBS="-lcurl -lssl -lcrypto \ +LIBS="./cloudfront/lib/libcurl.so \ +./cloudfront/lib/libssl.so \ +./cloudfront/lib/libcrypto.so \ +./cloudfront/lib/liblog4cplus.so \ -lpthread -ldl -lrt \ --llog4cplus \ -lstdc++fs \ -lz \ -./libuv.a -pthread" +./libuv.a \ +-pthread" # 如果有静态 rocketmq 库就加上 if [ -f "$LIB_DIR/librocketmq.a" ]; then @@ -55,7 +58,7 @@ else fi # 编译命令 -g++ $CXXFLAGS $SRC $INCLUDE_DIRS $LIB_DIRS $LIBS -o "$OUT_DIR/$TARGET" +g++ $CXXFLAGS $SRC $INCLUDE_DIRS $LIB_DIRS $LIBS -Wl,-rpath='$ORIGIN/../cloudfront/lib' -o "$OUT_DIR/$TARGET" # 编译结果检查 if [ $? -eq 0 ]; then