Link libtool gcc 和 ld 错误
Link error with libtool gcc and ld
我有以下 configure+make 脚本来构建一些 sw 包 (libosip):
rm -rf build
rm -rf libosip2-4.1.0
rm -rf libosip2-4.1.0.tar.gz
wget https://ftp.gnu.org/gnu/osip/libosip2-4.1.0.tar.gz
tar xf libosip2-4.1.0.tar.gz
mkdir build
cd build
../libosip2-4.1.0/configure --enable-test --disable-shared
make -j
然后我从 libosip 主函数添加一个调用到 klee_make_symbolic。
klee_make_symbolic 位于此路径中的库中:
/home/oren/GIT/LatestKlee/klee/build/lib/
所以我尝试在调用 make 之前添加一个 LDFLAGS:
LDFLAGS="-L/home/oren/GIT/LatestKlee/klee/build/lib/" make -j
但是我得到以下错误:
/bin/bash ../../libtool --tag=CC --mode=link gcc -g -pedantic -g -DENABLE_TRACE -g -o torture_test torture.o ../../src/osipparser2/libosipparser2.la
libtool: link: gcc -g -pedantic -g -DENABLE_TRACE -g -o torture_test torture.o ../../src/osipparser2/.libs/libosipparser2.a
torture.o: In function `read_text':
/home/oren/GIT/LatestKlee/myBenchmarks/libosip/build/src/test/../../../libosip2-4.1.0/src/test/torture.c:62: undefined reference to `klee_make_symbolic'
collect2: error: ld returned 1 exit status
非常感谢任何帮助,谢谢!
您实际上需要 link 那个带有 -l
link er 选项的库。
LDFLAGS="-L/home/oren/GIT/LatestKlee/klee/build/lib/"
添加库搜索路径但不添加 link 任何库。
我有以下 configure+make 脚本来构建一些 sw 包 (libosip):
rm -rf build
rm -rf libosip2-4.1.0
rm -rf libosip2-4.1.0.tar.gz
wget https://ftp.gnu.org/gnu/osip/libosip2-4.1.0.tar.gz
tar xf libosip2-4.1.0.tar.gz
mkdir build
cd build
../libosip2-4.1.0/configure --enable-test --disable-shared
make -j
然后我从 libosip 主函数添加一个调用到 klee_make_symbolic。 klee_make_symbolic 位于此路径中的库中:
/home/oren/GIT/LatestKlee/klee/build/lib/
所以我尝试在调用 make 之前添加一个 LDFLAGS:
LDFLAGS="-L/home/oren/GIT/LatestKlee/klee/build/lib/" make -j
但是我得到以下错误:
/bin/bash ../../libtool --tag=CC --mode=link gcc -g -pedantic -g -DENABLE_TRACE -g -o torture_test torture.o ../../src/osipparser2/libosipparser2.la
libtool: link: gcc -g -pedantic -g -DENABLE_TRACE -g -o torture_test torture.o ../../src/osipparser2/.libs/libosipparser2.a
torture.o: In function `read_text':
/home/oren/GIT/LatestKlee/myBenchmarks/libosip/build/src/test/../../../libosip2-4.1.0/src/test/torture.c:62: undefined reference to `klee_make_symbolic'
collect2: error: ld returned 1 exit status
非常感谢任何帮助,谢谢!
您实际上需要 link 那个带有 -l
link er 选项的库。
LDFLAGS="-L/home/oren/GIT/LatestKlee/klee/build/lib/"
添加库搜索路径但不添加 link 任何库。