First reading the wrong information, on the development board to run [root @ my lib] #./arm - the Modbus - serial - QWS./arm - the Modbus - serial: error while loading Shared libraries: libmodbus. So. 5: always open a Shared object file: No to the file or directory I have already put libmodbus cross compile and has been in the following directory usr/local/arm development board - libmodbus - 3.0.3/add in pro file (qtcreator automatically add) win32: CONFIG (release, the debug | release) : LIBS +=- $L $PWD/../../../../../usr/local/arm - libmodbus - 3.0.3/lib/release/- lmodbuselse: win32: CONFIG (debug, the debug | release) : LIBS +=- $L $PWD/../../../../../usr/local/arm - libmodbus - 3.0.3/lib/debug/- lmodbuselse: Unix: LIBS +=L $$PWD/../../../../../usr/local/arm - libmodbus - 3.0.3/lib/lmodbusINCLUDEPATH +=$$PWD/../../../../../usr/local/arm - libmodbus - 3.0.3/includeDEPENDPATH +=$$PWD/../../../../../usr/local/arm - libmodbus - 3.0.3/include I want to ask next, qt program after the operation, if the link external libraries, what is the search path? Whether the else: Unix: LIBS +=L $$PWD/../../../../../usr/local/arm - libmodbus - 3.0.3/lib/- lmodbus,
CodePudding user response:
You also put libmodbus library calls in QT?
CodePudding user response:
The building Lord how transplant libmodbus ah have compiled library? Sharing!
CodePudding user response:
It should not be difficult to compile the library! 1. CC=arm - Linux - GCC./configure -- prefix=/home/XXX/libmodbus/-- host=arm - linux2. Make & amp; Make install3. Bin file generated test procedure under the hidden files, you can put a pre-compiled library under the lib of qt library!
CodePudding user response:
Have a command of glibc called "LDD" and can be used to detect the application or dynamic library to other dynamic library dependencies, such as: [root @ localhost bin] # LDD which Linux - gate. So. 1=& gt; (0 x00189000) libc. So. 6=& gt;/lib/libc. So. 6 (0 x00382000)/lib/ld - Linux. So. 2 (0 x0035c000) if you don't have this command in the root file system, can only try to guess,
CodePudding user response:
Dynamic link library has a problem, I don't by compiled using Ubuntu, copied from the Ubuntu so file to development board in the past, can't run, compiled using Debian9 can pass, with Debian9 copy so file can run successfully in the past,