fix build

This commit is contained in:
lnk
2025-06-25 10:48:50 +08:00
parent ec8689c9f5
commit 969f794919

View File

@@ -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