我正在尝试在Netbeans和输出控制台中构建一个C ++项目,我遇到了以下编译错误,该错误源于一个名为-lsrc的缺失文件(标有###)
我正在使用Suse Linux(SLED 11),有没有人知道我应该在软件包安装程序中下载哪个软件包,以便我能克服这个gcc编译问题?
g++ -o dist/Debug/GNU-Linux-x86/cppthriftserverv1
build/Debug/GNU-Linux-x86/_ext/1338215927/test_types.o -lsrc
#### HERE ####
/usr/lib/gcc/i586-suse-linux/4.3/../../../../i586-suse-linux/bin/ld:
cannot find -lsrc
collect2: ld returned 1 exit status
#### HERE #####
gmake[2]: *** [dist/Debug/GNU-Linux-x86/cppthriftserverv1] Error 1
gmake[2]: Leaving directory `/home/TRYOUT/THRIFT/CPPSERVER/CPPServerProject/CPPThriftServerV1'
gmake[1]: *** [.build-conf] Error 2
gmake[1]: Leaving directory `/home/TRYOUT/THRIFT/CPPSERVER/CPPServerProject/CPPThriftServerV1'
gmake: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 614ms)
答案 0 :(得分:0)
我认为IDE会尝试链接项目的src文件夹中的某个库。你在源代码中包含了一个库吗?您可以创建一个Makefile,这样您就可以尝试从控制台进行编译并查看编译器中的错误。