Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Not able to link shared library (.so) in QNX IDE: (3 Items)
   
Not able to link shared library (.so) in QNX IDE  
I am using QNX Momentics IDE Version 4.7. I am not able to link the shared library (.so) file during the build project. 
I am trying to build a simple makefile project

The error message which I am getting is:

make all 
cp kill.h ../include
cc -Vgcc_ntox86 -shared -a ../lib/killlib.so 
C:\QNX650\host\win32\x86\usr\bin\ntox86-ar: creating ../lib/killlib.so
cc -Bdynamic -Vgcc_ntox86 -DVERSION=\"VER5.00.01\" -g -l../lib/killlib.so -lsocket -c -o upgrade2.o upgrade2.c
cc -Bdynamic -o upgrade2 upgrade2.o -Vgcc_ntox86 -DVERSION=\"VER5.00.01\" -g -l../lib/killlib.so -lsocket 
C:\QNX650\host\win32\x86\usr\bin\ntox86-ld: cannot find -l../lib/killlib.so
cc: C:/QNX650/host/win32/x86/usr/bin/ntox86-ld caught signal 1
make: *** [upgrade2] Error 1

I am able to see killlib.so getting updated in lib forlder, but when I am trying to generate an executable, it is not 
able to find the library. 

I am attaching the makefile which I am using 
Attachment: Text makefile 660 bytes
Re: Not able to link shared library (.so) in QNX IDE  
This is not correct syntax for -l option. Its also an icorrect naming so .so file for compiler to find it later.
Please refer doc's on how to create shared libs (it would be something like
libkill.so
and
-lkill -L../lib
Re: Not able to link shared library (.so) in QNX IDE  
Thanks Elena,

Got it working with ur suggestion.

Thanks