public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* Re: Unresolved reference _imp__pthread_XXXX
       [not found] <F0E13277A26BD311944600500454CCD0569121@antarctica.intern.net>
@ 2003-05-27  6:41 ` Thomas Pfaff
  2003-05-27 19:56   ` Unresolved reference _imp__pthread_something Ghislain Cottat
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Pfaff @ 2003-05-27  6:41 UTC (permalink / raw)
  To: Ghislain Cottat; +Cc: pthreads-win32

Ghislain Cottat wrote:
> Hello,
> 
> Trying to compile a linux project with mingw32 (latests binaries, gcc
> 3.2.3
> and msys 1.0.8, etc.), I could build pthreadGC.dll, as well as all
> tests,
> and run them sucessfully, but when I try to link with my project (the
> build
> process works perfectly with linux), I have undefined reference with
> pthread
> symbols :
> 
> g++     -o cnedra.exe -lstdc++ -lpthreadGC kernel/cnedra-kernel.o
> kernel/cnedra-library.o kernel/cnedra-main.o kernel/cnedra-thread.o
> kernel/cnedra-plugin.o
> 

Try

g++  -o cnedra.exe kernel/cnedra-kernel.o
kernel/cnedra-library.o kernel/cnedra-main.o kernel/cnedra-thread.o
kernel/cnedra-plugin.o -lpthreadGC

The order is important if you link with GNU ld, you must put your libs 
behind the objects. And -lstdc++ is not neccessary if you link with g++.

Thomas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Unresolved reference _imp__pthread_something
  2003-05-27  6:41 ` Unresolved reference _imp__pthread_XXXX Thomas Pfaff
@ 2003-05-27 19:56   ` Ghislain Cottat
  0 siblings, 0 replies; 2+ messages in thread
From: Ghislain Cottat @ 2003-05-27 19:56 UTC (permalink / raw)
  To: pthreads-win32

(spam filtering didn't like the previous subject, guess why ;^))

Thomas Pfaff wrote:
> The order is important if you link with GNU ld, you must put your libs
> behind the objects. And -lstdc++ is not neccessary if you link with
> g++. 

You're right, it works. Thank you very much !

-- 
Ghiz



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-27 19:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <F0E13277A26BD311944600500454CCD0569121@antarctica.intern.net>
2003-05-27  6:41 ` Unresolved reference _imp__pthread_XXXX Thomas Pfaff
2003-05-27 19:56   ` Unresolved reference _imp__pthread_something Ghislain Cottat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).