我有一个让Netbeans以我想要的方式编译的问题。我不能让Netbeans编译我的程序。当我在Ubuntu终端时,我可以使用以下命令编译我的程序:
gcc -L/usr/local/lib -I/usr/local/include/libxml++-2.6 -I/usr/local/lib/libxml++-2.6/include -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/i386-linux-gnu/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/i386-linux-gnu/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -L/usr/local/lib build/Debug/GNU-Linux-x86/cardObject.o build/Debug/GNU-Linux-x86/visualisation.o build/Debug/GNU-Linux-x86/monitoring.o build/Debug/GNU-Linux-x86/main.o build/Debug/GNU-Linux-x86/player.o build/Debug/GNU-Linux-x86/detectBiddings.o build/Debug/GNU-Linux-x86/gameStatsObject.o build/Debug/GNU-Linux-x86/cardOCR.o build/Debug/GNU-Linux-x86/cardModifications.o build/Debug/GNU-Linux-x86/geometry.o build/Debug/GNU-Linux-x86/boardNumber.o build/Debug/GNU-Linux-x86/cardSuit.o build/Debug/GNU-Linux-x86/bidObject.o build/Debug/GNU-Linux-x86/dummyCorner.o build/Debug/GNU-Linux-x86/trayCorner.o build/Debug/GNU-Linux-x86/logicConnection.o build/Debug/GNU-Linux-x86/bidSuit.o build/Debug/GNU-Linux-x86/bmCommunication.o build/Debug/GNU-Linux-x86/imageProcessing.o build/Debug/GNU-Linux-x86/bidOCR.o -lclsocket -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_video -lcurl -lxml++-2.6 -pthread -lxml++-2.6 -lxml2 -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 -o dist/Debug/GNU-Linux-x86/trunk
这是有效的,但是如何在Netbeans中设置包含的库,附加选项,编译选项和包含的目录,让它像上面的命令一样进行编译?
谢谢
答案 0 :(得分:1)
我终于找到了Netbeans中的问题。如果在Netbeans中包含库(在“链接器”选项卡中),则无需手动添加所有-l ...文件。从添加选项行中删除-l ...文件为我解决了问题。