【发布时间】:2015-03-31 13:58:44
【问题描述】:
我正在尝试编译一些文件,这很好,但是当我尝试按如下方式链接它们时出现错误:
Building target: EoCu
Invoking: GCC C++ Linker
g++ -L"/home/workspace/production-Alginterface/Shared/libs" -m32 -g -rdynamic -Wl,-rpath-link=../../production-Alginterface/Shared/libs -g -rdynamic -o "EoCu" ./simpleini/ConvertUTF.o ./simpleini/snippets.o ./Tinyxpath/action_store.o ./Tinyxpath/htmlutil.o ./Tinyxpath/lex_util.o ./Tinyxpath/node_set.o ./Tinyxpath/tinystr.o ./Tinyxpath/tinyxml.o ./Tinyxpath/tinyxmlerror.o ./Tinyxpath/tinyxmlparser.o ./Tinyxpath/tokenlist.o ./Tinyxpath/xml_util.o ./Tinyxpath/xpath_expression.o ./Tinyxpath/xpath_processor.o ./Tinyxpath/xpath_stack.o ./Tinyxpath/xpath_static.o ./Tinyxpath/xpath_stream.o ./Tinyxpath/xpath_syntax.o ./AlarmsMsg.o ./AppWatchDog.o ./BaseIteration.o ./CommunicationManager.o ./ConfigValidator.o ./FilesMng.o ./GuiInputHandler.o ./GuiManager.o ./IniReader.o ./IniWriter.o ./MessageBuilder.o ./MngFile.o ./MsgBroker.o ./NetworkDisconnectTimerCallable.o ./ShareDialog.o ./SpoIteration.o ./TCPServer.o ./Timer.o ./TimerCallable.o ./TrendsRecorder.o ./TrendsUtlFunc.o ./XMLBuilder.o ./XMLParser.o ./actmgr.o ./cdlCom.o ./entry.o ./ioctrl.o ./iteration.o ./msgqueue.o ./prmdb.o ./qthread.o ./usbDrive.o -lrt -llog4cxx -lapr-1 -laprutil-1 -lexpat -lpthread
当我通过 eclipse 编译和运行时,我输入了正确的库,它运行良好,但是当我通过 make 文件执行此操作时,我得到了这个错误,尽管它是相同的 make 文件!,有人可以帮我吗?
/usr/bin/ld: warning: libexpat.so.0, needed by /home/workspace/production-Alginterface/Shared/libs/libaprutil-1.so, not found (try using -rpath or -rpath-link)
提前致谢。
【问题讨论】:
-
什么警告你不明白?它找不到 libexpat.so.0,因此请检查并相应地更新您的 rpath
-
但它位于:“/home/workspace/production-Alginterface/Shared/libs”
-
那个位置的 libexpat.so.0 是 32 位吗?
标签: c++ c compiler-errors linker linker-errors