I tried on two different computers (i386 and x64) with the same results:
Code: Select all
cp ../../resources/* ./
gcc -m64 -g -c test1.c
gcc -m64 -g -c test2.c
gcc -m64 -g -c test3.c
gcc -m64 -g -c test4.c
gcc -m64 -g -c test5.c
gcc -m64 -g -c test6.c
gcc -m64 -ldl -lm -o test1 test1.o
/usr/bin/ld: test1.o: in function `sv_load_dll2':
/home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:666: undefined reference to `dlopen'
/usr/bin/ld: /home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:669: undefined reference to `dlerror'
/usr/bin/ld: /home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:676: undefined reference to `dlsym'
/usr/bin/ld: /home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:677: undefined reference to `dlsym'
/usr/bin/ld: /home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:678: undefined reference to `dlsym'
/usr/bin/ld: /home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:679: undefined reference to `dlsym'
/usr/bin/ld: /home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:680: undefined reference to `dlsym'
/usr/bin/ld: test1.o:/home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:681: more undefined references to `dlsym' follow
/usr/bin/ld: test1.o: in function `sv_unload_dll':
/home/ats/sunvox_lib/examples/c/../../headers/sunvox.h:769: undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: all] Error 1
cp ../../linux/lib_x86/sunvox.so ./
make CFLAGS="-m32" LDFLAGS="-m32 -ldl -lm"