From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27782 invoked by alias); 27 May 2003 06:41:46 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 27675 invoked from network); 27 May 2003 06:41:45 -0000 Received: from unknown (HELO four-d.de) (129.247.190.4) by sources.redhat.com with SMTP; 27 May 2003 06:41:45 -0000 Received: (from mail@localhost) by four-d.de (8.9.3/8.9.3) id IAA30086; Tue, 27 May 2003 08:41:44 +0200 X-Authentication-Warning: atacama.four-d.de: mail set sender to using -f Received: from algeria.intern.net(192.168.2.71) by atacama.four-d.de via smap (V2.1+anti-relay+anti-spam) id xma030084; Tue, 27 May 03 08:41:36 +0200 Message-ID: <3ED3089F.5070406@gmx.net> Date: Tue, 27 May 2003 06:41:00 -0000 From: Thomas Pfaff User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ghislain Cottat CC: pthreads-win32@sources.redhat.com Subject: Re: Unresolved reference _imp__pthread_XXXX References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003/txt/msg00058.txt.bz2 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