Michael Gerdau | 10 Aug 2005 07:48
Picon
Favicon

Re: Problem with linking application's own shared library

Hi Sergey !

Your commandlines are somewhat difficult to read but here's what
occured to me:

> > /bin/sh ../libtool --tag=CXX --mode=link g++  -Wnon-virtual-dtor 
> > -Wno-long-long -Wundef -Wall -W -Wp
> > ointer-arith -Wwrite-strings -O2 -fno-exceptions -fno-check-new 
> > -fno-common -no-undefined -mthreads
> > -Wall -O2 -fexceptions -frtti  -DUNICODE -DQT_DLL -DQT_THREAD_SUPPORT 
> > -DQT_NO_DEBUG -fno-strict-alia
> > sing    -o sim.exe -L/c/Qt/3.3.4/lib   -L/c/Qt/3.3.4/lib 
> > -D_THREAD_SAFE -pthread  sim.o libsim.la -l

Why do you have '-pthread' in there ?

> > kernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 -lole32 
> > -loleaut32 -luuid -limm32 -lwinmm
> > -lws2_32 -lwinspool
> > g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith 
> > -Wwrite-strings -O2 -fno-exce
> > ptions -fno-check-new -fno-common -Wall -O2 -fexceptions -frtti 
> > -DUNICODE -DQT_DLL -DQT_THREAD_SUPPO
> > RT -DQT_NO_DEBUG -fno-strict-aliasing -o .libs/sim.exe -D_THREAD_SAFE 
> > sim.o  -mthreads -L/c/Qt/3.3.4
> > /lib -pthread ./.libs/libsim.dll.a -lqt-mt -L/mingw/lib 

What is './.libs/libsim.dll.a' ?

I assume you mean something like '-L ./.libs -lsim' (or similar).

> > /mingw/lib/libxslt.dll.a /mingw/lib/libxml2.
> > dll.a -lz -lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 

Same with '/mingw/lib/libxslt.dll.a' and '/mingw/lib/libxml2.dll.a'

I assume that should be '-lxslt -lxml2'

> All files and libraries exists.

Are you sure you have libraries './.libs/libsim.dll.a',
'/mingw/lib/libxslt.dll.a' and '/mingw/lib/libxml2.dll.a' ?

If the above does not help you find the problem it probably would
be helpful if you could create a small selfcontained example that
exposes the problem.

Best,
Michael
--

-- 
 Vote against SPAM - see http://www.politik-digital.de/spam/
 Michael Gerdau       email: mgd@...
 GPG-keys available on request or at public keyserver

Gmane