I am compiling with arm-linux-gnueabi-g ++ version 4.7.3.
I have arm-linux-gnueabi libraries installed in the location:
/ usr / arm-linux-gnueabi / lib, it contains libdl.a, libdl.so, libdl.so.2, and libdl-2.19.so.
Links libdl.so to libdl.so.2, which references libdl-2.19.so.
I am trying to link to the dl library (see below command), but always get undefined reference errors.
arm-linux-gnueabi-g++ -I. -I../ -I../Comms/Linux -Wall -DLINUX -fpic -o ../../work/MyProgram main.o -L../../work -L/usr/arm-linux-gnueabi/lib -lComms -lConsole -lUtilities -ldl ../../work/libUtilities.so: undefined reference to `dlsym' ../../work/libUtilities.so: undefined reference to `dlopen' collect2: error: ld returned 1 exit status
If I compile with g ++ 4.8.2 using the following commend, then my program compiles, links, and performs fine.
g++ -I. -I../ -I../Comms/Linux -Wall -DLINUX -fpic -o ../../work/MyProgram main.o -L../../work -lComms -lConsole -lUtilities -ldl
Obviously, he cannot find the libdl.so library; I thought that adding the path to the location of the corresponding library using the -L flag would fix the problem, but it is not.
What am I missing using the ARM compiler command?
source share