I've been trying for a few hours now to get the threads lib examples
to compile. I built the libraries with jam and all but python built
correctly.
When I create a new Win32 console application and copy the code ( See
end of message from the thread class example and attempt to compile I
get:
===================Start Error
--------------------Configuration: threadtest - Win32 Debug-----------
---------
Compiling...
threadtest.cpp
c:\projects\boost\threadtest\threadtest.cpp(27) : error C2228: left
of '.join' must have class/struct/union type
Error executing cl.exe.
Creating browse info file...
threadtest.exe - 1 error(s), 0 warning(s)
===================End Error
Can't figure out what I'm doing wrong. Thanks for any help.
Brian Todoroff
========================Start Code (to end)
#include
This is a problem of VC interpreting the statement as a function
declaration. Modify to the following:
thread_alarm alarm(secs);
boost::thread thrd( alarm );
...and it should compile.
Make sure you link with the multithreaded DLL libraries.
Justin
-----Original Message-----
From: brian_todoroff@yahoo.com [mailto:brian_todoroff@yahoo.com]
Sent: Tuesday, November 20, 2001 2:17 AM
To: Boost-Users@yahoogroups.com
Subject: [Boost-Users] Threads on MSVC 6.0
I've been trying for a few hours now to get the threads lib examples
to compile. I built the libraries with jam and all but python built
correctly.
When I create a new Win32 console application and copy the code ( See
end of message from the thread class example and attempt to compile I
get:
===================Start Error
--------------------Configuration: threadtest - Win32 Debug-----------
---------
Compiling...
threadtest.cpp
c:\projects\boost\threadtest\threadtest.cpp(27) : error C2228: left
of '.join' must have class/struct/union type
Error executing cl.exe.
Creating browse info file...
threadtest.exe - 1 error(s), 0 warning(s)
===================End Error
Can't figure out what I'm doing wrong. Thanks for any help.
Brian Todoroff
========================Start Code (to end)
#include
participants (2)
-
brian_todoroff@yahoo.com
-
Justin Crites