我有以下配置 + 制作脚本来构建一些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 main函数的调用添加到 klee_make_symbolic 。 klee_make_symbolic位于此路径中的库中:
/home/oren/GIT/LatestKlee/klee/build/lib/
所以我在调用make:
之前尝试添加LDFLAGSLDFLAGS="-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
非常感谢任何帮助,谢谢!
答案 0 :(得分:1)
您需要使用-l
链接器选项实际链接该库。
LDFLAGS="-L/home/oren/GIT/LatestKlee/klee/build/lib/"
添加了库搜索路径,但未链接任何库。