[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Join not linking in threads (Compile error)

From: Federico Montesino Pouzols
Subject: Re: Join not linking in threads (Compile error)
Date: Tue, 18 Mar 2003 16:58:55 +0100
User-agent: Mutt/1.5.3i

        Yes, this is a known bug in 1.0.8, join is not linked in on
win32 (not only mingw) systems since it is inside an #ifdef
WIN32. This is fixed in CVS for 1.0.9, which should be released soon,
as soon as we process some pending issues. You can fix it by moving
the definition of join outside the #ifdef WIN32 (in src/thread.cpp),
for instance right above the definition of

        As for `#define HAVE_OLD_IOSTREAM', it is needed for Mingw
systems based on gcc 2.9x, but as you have noticed, gcc 3.x does not
like it.

On Tue, Mar 18, 2003 at 11:03:25AM +0000, Jon Wilson wrote:
> I am building using MingW32 and GCC3.2, the only thing I have editied 
> from v1.0.8 is to remove the #define HAVE_OLD_IOSTREAM in 
> win32/config.h, but when I compile this...
> #include <cc++/thread.h>
> using namespace std;
> using namespace ost;
> class myThread:public Thread{
>    public:
>        myThread(){
>            start();
>        }
>        void run(){
>        }
> };
> int main(int argc, char *argv[]){
>    myThread thread;
>    thread.join();
> }
> I get...
> g++.exe src/buffer.o src/cmdoptns.o src/date.o src/digest.o src/dir.o 
> src/dso.o src/engine.o src/event.o src/exception.o src/fifo.o src/file.o 
> src/friends.o src/ftp.o src/getopt1.o src/getopt.o src/groups.o 
> src/inaddr.o src/keydata.o src/md5.o src/mempager.o src/mutex.o 
> src/network.o src/numbers.o src/peer.o src/persist.o src/pipe.o 
> src/port.o src/process.o src/semaphore.o src/serial.o src/sha.o 
> src/slog.o src/socket.o src/thread.o src/threadkey.o src/unix.o 
> src/url.o src/urlstring.o src/xml.o main.o  -o "commoncpp.exe" 
> -L"C:/Dev-Cpp/lib" -L"C:/Work/commoncpp2-1.0.8b/win32" -lwsock32 
> -lws2_32 -I"C:/Dev-Cpp/include"  -I"C:/Dev-Cpp/include/c++"  
> -I"C:/Dev-Cpp/include"  -I"c:/Dev-Cpp/include/c++/mingw32"  
> -I"C:/Work/commoncpp2-1.0.8b/include"  -I"C:/Work/commoncpp2-1.0.8b/win32" 
> main.o(.text+0x36):main.cpp: undefined reference to `ost::Thread::join()'
> (Excuse the b in 1.0.8b, I have two copies built in the same folder)
> Do you know why this could be?
> __MINGW32__ is being set.
> Thanks.
> Jon Wilson
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp

reply via email to

[Prev in Thread] Current Thread [Next in Thread]