铛:错误:没有这样的文件或目录错误

问题描述:

当我编译我的项目,编译器抛出此消息:铛:错误:没有这样的文件或目录错误

if (. != ".") /bin/mv math3dgraphics.o . 

ar rcv ./mathtools.a ./mathtools.o ./matrix.o ./matrixtools.o ./pscmds.o ./pccurvecmds.o ./math3dgraphics.o 
r - ./mathtools.o 
r - ./matrix.o 
r - ./matrixtools.o 
r - ./pscmds.o 
r - ./pccurvecmds.o 
r - ./math3dgraphics.o 
ranlib ./mathtools.a 
/usr/bin/gcc -g -o -I/opt/X11/include xrna xrna.o xrnainit.o xrnatools.o xrnadisplay.o xrnamenu.o xrnalabels.o xrnalw.o xrnasstr.o xrnapccurve.o xrnatube.o xrnassymbols.o xrnatstr.o xrnabasepair.o xrnacon.o xrnathred.o xrnacolorwidget.o xrnastred.o xrnainquire.o tdhrefnuc.o xrnabuttonmenu.o grplinebuttonlist.o grplinefnclist.o grpparallelogrambuttonlist.o grpparallelogramfnclist.o grptextbuttonlist.o grptextfnclist.o grptrianglebuttonlist.o grptrianglefnclist.o grparcbuttonlist.o grparcfnclist.o grparrowbuttonlist.o grparrowfnclist.o transformbuttonlist.o transformfnclist.o xrnaprintbuttonlist.o xrnaprintfnclist.o xrnagraphics.o xrnaneutronmap.o xrnaalign.o helixtools.o helixio.o helixarc.o ./botif.a ./mathtools.a -DMATHHFILE='"./mathtools.h"' -L/opt/X11/lib -lX11 -lm -lg -lc -I/opt/X11/include 
clang: error: no such file or directory: 'xrna' 

make[1]: *** [install] Error 1 

make: *** [xrna] Error 2 

什么让我感到困惑的是,xrna应该是生成的可执行文件,但为什么编译说它缺少?

+3

尝试更换'-I /选择/ X11/include'和'xrna',即'在/ usr/bin中/ gcc的-g -o xrna -I /选择/ X11 /包括xrna.o ...'。 – s7amuser

+1

的'-o'选项后面紧跟输出文件名;你选择输出到'-I/opt/X11/include'(这非常古怪作为一个文件名),并且你说它应该使用的一个文件(作为输入)被称为'xrna '。如果你已经编译好的程序,你就会有一个不同的错误,但在命令行中也能发挥同样错误。你需要'-o xrna -I /选择/ X11/include'或'-I /选择/ X11/-o包括xrna'或其他一些变异。 –

当使用一个链接声明-o选项,第二天条目是文件输出的名称,而不是一些库选项。