It’s working now. Thanks to Colin and kc.
I have another question, how do I add a command to the common.mk at the end of the
creating the shared library.
Following is my common.mk file.
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)
NAME=libfs
TOPDIR=…/…/…/…/…/…/…/…
INSTALL_ROOT_nto=$(TOPDIR)/fs
INSTALLDIR=/
EXCLUDE_OBJS = pthread.o
CCFLAGS += -nostdinc -DQNX -shared
LDFLAGS =-Wl,–version-script=$(PROJECT_ROOT)/export.qnx
include $(MKFILES_ROOT)/qtargets.mk
I need to run a commond towards the libfs.so for adding a signature. How do I do
that?
If this is not the right form to discuss, let me know which form I should post this
question to.
Thanks for your help.
-Beth
Colin Burgess wrote:
Beth <> id@address.com> > wrote:
My link line looks like this:
qcc -V gcc_ntox86 -DNTO_X86 -Wl,-shared,-h -Wl,–version-script=myexport.qnx
^^
obj1.o obj2.o -o …/lib/libfs.so
Ok, I see the problem.
Instead of -Wl,-shared,-h you should have -shared -Wl,-h,libfs.so
-h sets the DT_SONAME record in the shared library, which is noted when
you link against that shared lib. You were accidentally setting the SONAME
to --version-script=myexport.qnx, so the app looked for that when starting
up.
Also note that -shared should be passed directly to qcc, not via the
-Wl interface.
–
cburgess@qnx.com