Hi,
I am trying to use BOOST threads with SDL.
I write a code and run, but the program does not run correctly(i.e i cannot move the output window and i have to force terminate it.)
Also during compilation a warning is given as:

1>LINK : E:\Program Files\src\threading\example\Debug\example.exe not found or not built by the last incremental link; performing full link
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library[\b]

Also I am not sure how to synchronise the sdl events with threads.
Are there things i need to take care of?

Since it seems you are beginning in Boost, I may well suggest you check POCO. It is said that they are simple though haven't used them, nor boost

If POCO is easier than BOOST(for threading, i sure will try it.
And please help me find the tutorials, I will google those myself anyways.
But thanks for the suggestions.
My main target is to make a game which includes OPENGL as well threading.
I am not familiar with windows programming so i am choosing SDL as I have tried many things with it. Will POCO be ok for me to use with OPenGL + SDL.

Your build of the boost-thread library appears to be broken; built without MT support. MSVCRT and MSVCRTD are the single-threaded runtime libraries, you should not link to one of these libraries in any program that uses threads of any kind - native, Boost, POCO, ACE, wxWidgets, whatever.

Either use Boost.Build to rebuild the binary libraries correctly. Or download and install pre-built boost binaries for Windows by running this setup program from BoostPro http://www.boostpro.com/download/boost_1_44_setup.exe

> If POCO is easier than BOOST(for threading, i sure will try it.

POCO and Boost address different audiences. Boost gives general functionality that could conceivably be part of a standard library with flexibility and performance as overriding design goals. POCO is much more like ACE - more of a framework library giving you readily usable components (akin to the Java/J2EE library) with the attendant cost of having more dependencies between parts; it's more of a heavyweight 'all or nothing' library with higher run-time overheads.

Both ACE and POCO tend to use far less bleeding edge features of C++ than Boost - unlike with Boost, you don't have to be a C++/template guru to understand the source code for either of these. ACE is more mature and robust, but is somewhat dated in its coding style. POCO source code is very well written - quite easy to read and understand even for a beginner in C++.

If I just wanted a library for portable threading with some ipc mechanisms, I would use Boost threads with Boost asio. If I also wanted support for running network-based applications with assorted network protocols, authentication, xml, active objects and so on, I would use either ACE or POCO.

If POCO is easier than BOOST(for threading, i sure will try it.
And please help me find the tutorials, I will google those myself anyways.
But thanks for the suggestions.
My main target is to make a game which includes OPENGL as well threading.
I am not familiar with windows programming so i am choosing SDL as I have tried many things with it. Will POCO be ok for me to use with OPenGL + SDL.

As said earlier, POCO have threading library. You can read their docs online or download them at their site

I downloaded the POCO library(poco 1.3.6p2). But the lib folder is not included there? Should i do sth to make it or is my download incomplete?

Which os are you in?
You have to uild it and is very simple and documented in Download page.
Here I quote from them

Please see the included README file for instructions.

On Unix platforms, you'll be fine with ./configure; make.
For Windows users, Visual C++ project files and build scripts are included.

You can exclude some libraries from the build.

On Windows, edit the file named components and remove the lines corresponding to the libraries you wish to exclude.
On Linux, call the configure script with the --omit option, e.g.
./configure --omit=NetSSL_OpenSSL,Crypto or ./configure --omit=Data.

I am using windows 7. I am using VC++ 2008.
As said in the README i ran the buildwin.cmd(90) script from the command prompt of vc++. I dont think anything happened. what is to be done?

I now built the library(Foundation_vs90) from the vc++ (build -> build batch -> select all -> rebuild)
while building it says

I have hereby attached the log of the build.

it says at the end that:
========= Rebuild All: 4 succeeded, 10 failed, 0 skipped ==========

Attachments
Build Log      Rebuild started: Project: TestSuite, Configuration: debug_shared|Win32
 Command Lines      Creating temporary file "e:\turmoil\poco-1.3.6p2-all\Foundation\testsuite\obj\debug_shared\RSP00004D19242484.rsp" with contents
[
/Od /I "..\include" /I "..\..\CppUnit\include" /I "..\..\CppUnit\WinTestRunner\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WINVER=0x0500" /D "_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"obj\debug_shared\\" /Fd"obj\debug_shared\vc90.pdb" /W3 /c /ZI /TP ".\src\SimpleHashTableTest.cpp"

".\src\LinearHashTableTest.cpp"

".\src\HashTableTest.cpp"

".\src\HashSetTest.cpp"

".\src\HashMapTest.cpp"

".\src\HashingTestSuite.cpp"

".\src\UniqueExpireLRUCacheTest.cpp"

".\src\UniqueExpireCacheTest.cpp"

".\src\LRUCacheTest.cpp"

".\src\ExpireLRUCacheTest.cpp"

".\src\ExpireCacheTest.cpp"

".\src\CacheTestSuite.cpp"

".\src\PriorityEventTest.cpp"

".\src\FIFOEventTest.cpp"

".\src\EventTestSuite.cpp"

".\src\DummyDelegate.cpp"

".\src\BasicEventTest.cpp"

".\src\TaskTestSuite.cpp"

".\src\TaskTest.cpp"

".\src\TaskManagerTest.cpp"

".\src\SharedMemoryTest.cpp"

".\src\ProcessTest.cpp"

".\src\ProcessesTestSuite.cpp"

".\src\NamedMutexTest.cpp"

".\src\NamedEventTest.cpp"

".\src\WinDriver.cpp"

".\src\FoundationTestSuite.cpp"

".\src\URITestSuite.cpp"

".\src\URITest.cpp"

".\src\URIStreamOpenerTest.cpp"

".\src\UTF8StringTest.cpp"

".\src\UnicodeConverterTest.cpp"

".\src\TextTestSuite.cpp"

".\src\TextIteratorTest.cpp"

".\src\TextEncodingTest.cpp"

".\src\TextConverterTest.cpp"

".\src\StreamConverterTest.cpp"

".\src\TimezoneTest.cpp"

".\src\TimestampTest.cpp"

".\src\TimespanTest.cpp"

".\src\StopwatchTest.cpp"

".\src\LocalDateTimeTest.cpp"

".\src\DateTimeTestSuite.cpp"

".\src\DateTimeTest.cpp"

".\src\DateTimeParserTest.cpp"

".\src\DateTimeFormatterTest.cpp"

".\src\UUIDTestSuite.cpp"

".\src\UUIDTest.cpp"

".\src\UUIDGeneratorTest.cpp"

".\src\PathTest.cpp"

".\src\GlobTest.cpp"

".\src\FileTest.cpp"

".\src\FilesystemTestSuite.cpp"

".\src\TestChannel.cpp"

".\src\SimpleFileChannelTest.cpp"

".\src\PatternFormatterTest.cpp"

".\src\LogStreamTest.cpp"

".\src\LoggingTestSuite.cpp"

".\src\LoggingRegistryTest.cpp"

".\src\LoggingFactoryTest.cpp"

".\src\LoggerTest.cpp"

".\src\FileChannelTest.cpp"

".\src\ChannelTest.cpp"

".\src\TestPlugin.cpp"

".\src\SharedLibraryTestSuite.cpp"

".\src\SharedLibraryTest.cpp"

".\src\ManifestTest.cpp"

".\src\ClassLoaderTest.cpp"

".\src\TimerTest.cpp"

".\src\ThreadTest.cpp"

".\src\ThreadPoolTest.cpp"

".\src\ThreadLocalTest.cpp"

".\src\ThreadingTestSuite.cpp"

".\src\SemaphoreTest.cpp"

".\src\RWLockTest.cpp"

".\src\ConditionTest.cpp"

".\src\ActivityTest.cpp"

".\src\ActiveMethodTest.cpp"

".\src\ActiveDispatcherTest.cpp"

".\src\TimedNotificationQueueTest.cpp"

".\src\PriorityNotificationQueueTest.cpp"

".\src\NotificationsTestSuite.cpp"

".\src\NotificationQueueTest.cpp"

".\src\NotificationCenterTest.cpp"

".\src\SHA1EngineTest.cpp"

".\src\RandomTest.cpp"

".\src\RandomStreamTest.cpp"

".\src\MD5EngineTest.cpp"

".\src\MD4EngineTest.cpp"

".\src\MD2EngineTest.cpp"

".\src\HMACEngineTest.cpp"

".\src\DigestStreamTest.cpp"

".\src\CryptTestSuite.cpp"

".\src\ZLibTest.cpp"

".\src\TeeStreamTest.cpp"

".\src\StreamTokenizerTest.cpp"

".\src\StreamsTestSuite.cpp"

".\src\StreamCopierTest.cpp"

".\src\NullStreamTest.cpp"

".\src\MemoryStreamTest.cpp"

".\src\LineEndingConverterTest.cpp"

".\src\HexBinaryTest.cpp"

".\src\FileStreamTest.cpp"

".\src\CountingStreamTest.cpp"

".\src\BinaryReaderWriterTest.cpp"

".\src\Base64Test.cpp"

".\src\TypeListTest.cpp"

".\src\TuplesTest.cpp"

".\src\StringTokenizerTest.cpp"

".\src\StringTest.cpp"

".\src\SharedPtrTest.cpp"

".\src\RegularExpressionTest.cpp"

".\src\NumberParserTest.cpp"

".\src\NumberFormatterTest.cpp"

".\src\NDCTest.cpp"

".\src\NamedTuplesTest.cpp"

".\src\MemoryPoolTest.cpp"

".\src\FPETest.cpp"

".\src\FormatTest.cpp"

".\src\DynamicFactoryTest.cpp"

".\src\DynamicAnyTest.cpp"

".\src\CoreTestSuite.cpp"

".\src\CoreTest.cpp"

".\src\ByteOrderTest.cpp"

".\src\AutoReleasePoolTest.cpp"

".\src\AutoPtrTest.cpp"

".\src\AnyTest.cpp"
]
Creating command line "cl.exe @"e:\turmoil\poco-1.3.6p2-all\Foundation\testsuite\obj\debug_shared\RSP00004D19242484.rsp" /nologo /errorReport:prompt"
 Output Window      Compiling...
AnyTest.cpp
AutoPtrTest.cpp
AutoReleasePoolTest.cpp
ByteOrderTest.cpp
CoreTest.cpp
CoreTestSuite.cpp
DynamicAnyTest.cpp
DynamicFactoryTest.cpp
FormatTest.cpp
FPETest.cpp
MemoryPoolTest.cpp
NamedTuplesTest.cpp
NDCTest.cpp
NumberFormatterTest.cpp
NumberParserTest.cpp
RegularExpressionTest.cpp
SharedPtrTest.cpp
StringTest.cpp
StringTokenizerTest.cpp
TuplesTest.cpp
Generating Code...
Compiling...
TypeListTest.cpp
Base64Test.cpp
BinaryReaderWriterTest.cpp
CountingStreamTest.cpp
FileStreamTest.cpp
HexBinaryTest.cpp
LineEndingConverterTest.cpp
MemoryStreamTest.cpp
NullStreamTest.cpp
StreamCopierTest.cpp
StreamsTestSuite.cpp
StreamTokenizerTest.cpp
TeeStreamTest.cpp
ZLibTest.cpp
CryptTestSuite.cpp
DigestStreamTest.cpp
HMACEngineTest.cpp
MD2EngineTest.cpp
MD4EngineTest.cpp
MD5EngineTest.cpp
Generating Code...
Compiling...
RandomStreamTest.cpp
RandomTest.cpp
SHA1EngineTest.cpp
NotificationCenterTest.cpp
NotificationQueueTest.cpp
NotificationsTestSuite.cpp
PriorityNotificationQueueTest.cpp
TimedNotificationQueueTest.cpp
ActiveDispatcherTest.cpp
ActiveMethodTest.cpp
ActivityTest.cpp
ConditionTest.cpp
RWLockTest.cpp
SemaphoreTest.cpp
ThreadingTestSuite.cpp
ThreadLocalTest.cpp
ThreadPoolTest.cpp
ThreadTest.cpp
TimerTest.cpp
ClassLoaderTest.cpp
Generating Code...
Compiling...
ManifestTest.cpp
SharedLibraryTest.cpp
SharedLibraryTestSuite.cpp
TestPlugin.cpp
ChannelTest.cpp
FileChannelTest.cpp
LoggerTest.cpp
LoggingFactoryTest.cpp
LoggingRegistryTest.cpp
LoggingTestSuite.cpp
LogStreamTest.cpp
PatternFormatterTest.cpp
SimpleFileChannelTest.cpp
TestChannel.cpp
FilesystemTestSuite.cpp
FileTest.cpp
GlobTest.cpp
PathTest.cpp
UUIDGeneratorTest.cpp
UUIDTest.cpp
Generating Code...
Compiling...
UUIDTestSuite.cpp
DateTimeFormatterTest.cpp
DateTimeParserTest.cpp
DateTimeTest.cpp
DateTimeTestSuite.cpp
LocalDateTimeTest.cpp
StopwatchTest.cpp
TimespanTest.cpp
TimestampTest.cpp
TimezoneTest.cpp
StreamConverterTest.cpp
TextConverterTest.cpp
TextEncodingTest.cpp
TextIteratorTest.cpp
TextTestSuite.cpp
UnicodeConverterTest.cpp
UTF8StringTest.cpp
URIStreamOpenerTest.cpp
URITest.cpp
URITestSuite.cpp
Generating Code...
Compiling...
FoundationTestSuite.cpp
WinDriver.cpp
e:\turmoil\poco-1.3.6p2-all\cppunit\wintestrunner\include\wintestrunner\wintestrunner.h(27) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
NamedEventTest.cpp
NamedMutexTest.cpp
ProcessesTestSuite.cpp
ProcessTest.cpp
SharedMemoryTest.cpp
TaskManagerTest.cpp
TaskTest.cpp
TaskTestSuite.cpp
BasicEventTest.cpp
DummyDelegate.cpp
EventTestSuite.cpp
FIFOEventTest.cpp
PriorityEventTest.cpp
CacheTestSuite.cpp
ExpireCacheTest.cpp
ExpireLRUCacheTest.cpp
LRUCacheTest.cpp
UniqueExpireCacheTest.cpp
Generating Code...
Compiling...
UniqueExpireLRUCacheTest.cpp
HashingTestSuite.cpp
HashMapTest.cpp
HashSetTest.cpp
HashTableTest.cpp
LinearHashTableTest.cpp
SimpleHashTableTest.cpp
Generating Code...
 Results      Build log was saved at "file://e:\turmoil\poco-1.3.6p2-all\Foundation\testsuite\obj\debug_shared\BuildLog.htm"
TestSuite - 1 error(s), 0 warning(s)

Good Advice is to download CodeLite and get premake4. Then follow previous post and build it with Codelite projects. Only set project compiler as VC++ instead of g++

This article has been dead for over six months. Start a new discussion instead.