[omniORB-dev] [WinCE Port] First Linking problems :)

Xavier Outhier xavier.outhier@anfdata.cz
Tue, 29 Apr 2003 15:49:10 +0200


Hi all,

After trying to get native win32 thread version running,
I switch for pthread_nt configuration as the native leads
to too complicated errors for me.

In <Top>/mk/win32.mk I commented out
 # Use native win32 threads
 ThreadSystem = NT
and uncommeted out 
# Use pthread_nt, comment out ThreadSystem line above and uncomment the
# following 2 lines.
#ThreadSystem = NTPosix
#OMNITHREAD_CPPFLAGS= -D__POSIX_NT__

So instead of compiling omniORB-4.0.1/src/lib/omnithread/nt.cc
I compile omniORB-4.0.1/src/lib/omnithread/posix.cc.

I was able to fix all the compile error/change but I got a link error:

D:\omniORB-4.0.1\src>make export
making export in src/lib...
make[1]: Entering directory `/cygdrive/d/omniORB-4.0.1/src/lib'
making export in src/lib/omnithread...
make[2]: Entering directory `/cygdrive/d/omniORB-4.0.1/src/lib/omnithread'
+ rm -f static/omnithread.lib
+ ../../../bin/mips_pocketpc/libwrapper -gnuwin32 static/omnithread.lib static/posix.o
lib /OUT:static\omnithread.lib static\posix.o
Microsoft (R) Library Manager Version 6.20.8700
Copyright (C) Microsoft Corp 1992-2000. All rights reserved.

+ rm -f shared/omnithread30_rt.lib
+ ../../../bin/mips_pocketpc/linkwrapper -gnuwin32 -out:shared/omnithread30_rt.dll -DLL -IMPLIB:shared/omnithread30_rt.l
ib -libpath:../../../lib/mips_pocketpc shared/posix.o
link -out:shared\omnithread30_rt.dll -DLL -IMPLIB:shared/omnithread30_rt.lib -libpath:..\..\..\lib\mips_pocketpc shared\
posix.o
Microsoft (R) Incremental Linker Version 6.20.8700
Copyright (C) Microsoft Corp 1992-2000. All rights reserved.

   Creating library shared/omnithread30_rt.lib and object shared/omnithread30_rt.exp
posix.o : error LNK2019: unresolved external symbol _pthread_mutex_lock referenced in function "public: void __thiscall
omni_mutex::lock(void)" (?lock@omni_mutex@@QAEXXZ)
and so on with all the pthread functions.

Which library should I link with? Where to do such change?

Is it possible to use pthreads for winCE (http://public.planetmirror.com/pub/sourceware/pthreads-win32/dll-latest) ?
What should I change in the sources or in makefile?
Can I only link to the lib? Where do I add this information to link to
the lib file?

Best regards,

Xavier.