I try to cross compile from an x86_64 windows machine to a Raspberry Pi 4B running Raspberry OS lite and i already managed to run a "hello world" with my toolchain. Now, i want to create more complex programs which include dynamic libraries, and i fail in creating a makefile which links the dynamic libraries correctly. All libraries needed are available on the host as well as on the target device. When i link the makefile on the host:
LIBRARIES := C:/SysGCC/raspberry64/aarch64-linux-gnu/sysroot/lib/aarch64-linux-gnu/libdl.so.2
The program compiles properly, but the execution on the target rises the error: "error while loading shared libraries: no such file or directory". Which makes abosulte sense.
But, when i link the libraries of the target:
LIBRARIES := /opt/Vimba_5_1/VimbaC/DynamicLib/arm_64bit/libVimbaC.so /usr/lib/aarch64-linux-gnulibdl.so.2
The error "No such file or directory" arises within the compilation process.
My question is: How can i link the dynamic libraries properly?
Thanks in advance!