Open OPC UA cannot link libraries
-
Hallo zusammen,
ich versuche mich gerade daran mit der OpenOpcUA-Library zu arbeiten (https://github.com/FreeOpcUa/freeopcua).
Ich habe >make< durchlaufen lassen, hat alles gestimmt, die Testprogramme laufen.
Nun versuche ich es in Eclipse zum laufen zu bringen, aber er meint immer wieder, er könne die libs nicht finden.13:44:46 **** Incremental Build of configuration Debug for project OPC_Client **** make all Building target: OPC_Client Invoking: Cross G++ Linker g++ -L/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin -L/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master -o "OPC_Client" ./src/OPC_Client.o -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuaserver.so -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuaclient.so -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuacore.so -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuaprotocol.so -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/libtest_dynamic_addon.so /bin/ld: cannot find -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuaserver.so makefile:45: recipe for target 'OPC_Client' failed /bin/ld: cannot find -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuaclient.so /bin/ld: cannot find -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuacore.so /bin/ld: cannot find -l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuaprotocol.so collect2: Fehler: ld gab 1 als Ende-Status zurück make: *** [OPC_Client] Error 1 13:44:46 Build Finished (took 185ms)
Ich habe
/home/smanier/Arbeit/FreeOPC_UA_GIT/freeeopcua-master/bin /home/smanier/Arbeit/FreeOPC_UA_GIT/freeeopcua-master
als Library Paths eingestellt und
/home/smanier/Arbeit/FreeOPC_UA_GIT/freeeopcua-master/bin/libopcuaserver.so /home/smanier/Arbeit/FreeOPC_UA_GIT/freeeopcua-master/bin/libopcuaclient.so /home/smanier/Arbeit/FreeOPC_UA_GIT/freeeopcua-master/bin/libopcuacore.so /home/smanier/Arbeit/FreeOPC_UA_GIT/freeeopcua-master/bin/libopcuaprotocol.so
In den Libraries drin, muss ich sonst noch etwas tun? Die Pfade stimmen zumindest
Vielen Dank schonmal
Narase
-
Du hast kein C++-Problem!
verwende
-lopcuaclient.sostatt
-l/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin/libopcuaclient.so
-
Hallo, das hat leider nicht viel gebracht
17:16:14 **** Incremental Build of configuration Debug for project OPC_Client **** make all Building target: OPC_Client Invoking: Cross G++ Linker g++ -L/home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin -o "OPC_Client" ./src/OPC_Client.o -lopcuaclient.so -lopcuacore.so -lopcuaserver.so -lopcuaprotocol.so /bin/ld: cannot find -lopcuaclient.so makefile:45: recipe for target 'OPC_Client' failed /bin/ld: cannot find -lopcuacore.so /bin/ld: cannot find -lopcuaserver.so /bin/ld: cannot find -lopcuaprotocol.so collect2: Fehler: ld gab 1 als Ende-Status zurück make: *** [OPC_Client] Error 1 17:16:14 Build Finished (took 123ms)
-
Dann stehen die Libs nicht in /home/smanier/Arbeit/FreeOPC_UA_GIT/freeopcua-master/bin oder sie sind nicht passend (32/64 Bit?).
Wie gesagt: kein C++ Problem.
-
Doch, stehen sie, ich musste aber "-lopcuaclient" einbinden, also das '.so' am Ende auch noch weglassen
danach noch die libs in meinen /usr/lib64 kopieren damit die Binary auch ausgeführt werden kannTrotzdem danke für deine Mühe, hast mich auf den richtigen weg gebracht