Equvilant of Windows Dllmain() in QNX

bridged with qdn.public.qnxrtp.porting
Beth

Re: Equvilant of Windows Dllmain() in QNX

Post by Beth » Tue May 07, 2002 11:56 pm

kc,
I didn't know which post you were missing. I cut and pasted all of the response
regarding this subject and sent to your email address.

Thanks for your help.

-Beth

kc wrote:
Hey Beth,

For some reasons, I could not see some of earlier posts on this topic.
Strange. Goolge doesnt seem to have this group's archives Could you
forward them me? I just want to write down something for future
reference.

Thanks a lot.
kc

"Beth" <id@address.com> wrote in message
news:3CD2DAAC.7B3F1E3B@address.com...
Colin, thanks !

The POST_BUILD macro works great.

Very much appreciate your help.

-Beth


Colin Burgess wrote:

I think there is a macro called POST_BUILD (and a PRE_BUILD)

Beth <id@address.com> wrote:
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

--
cburgess@qnx.com

Post Reply

Return to “qdn.public.qnxrtp.porting”