• 15
• 15
• 11
• 9
• 10

# 2 questions...

This topic is 3653 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

1) Is it possible to get boost to work with Vs2008 or do I have top wait for an update for boost? I'm getting a bit fed up with having to use 2005 express to compile anything that uses one of the boost libarys because boost throws errors under vs 2008... 2) I still havn't found a good way to run my game loop. Most of the time function only have ~15ms accuracy and the high resolution one isn't supported by all systems. As a result my update loop that I want to run 50 times a second often only runs like 45 times even when cpu useage is at 5% :( All the examples ive found around seem to use functions that are part of a libary (eg SDL) and I don't really want to use a large libary just for a timer...

##### Share on other sites
You should be able to compile the latest source trunk with VC2008.
If you have downloaded the stable boost release (as I did) you can update it manually by using this patch

I ended up adding the patch by poking around in the source (its not that many entries) and it worked like a charm

##### Share on other sites
boost works just fine for me in VS 2008 Pro, the only *small* issue I have is the boost::bind library will output an error message to the debugger saying that the compiler is unsupported.

As for your timing issues...why not take a look at the SDL source and see how they handle timers for each of the platforms they support? Or are you just worried about QueryPerformanceCounter not working on multi-CPU systems?

##### Share on other sites
I just get this and it doesn't compile under VS2008 Pro
"Unknown compiler version - please run the configure tests and report the results"
I looked around on the boost site but couldn't find any instructions on what I am meant to do...Only how to change stuff not add a new compiler/compiler version :(

##### Share on other sites
Quote:
 Original post by Sync ViewsI just get this and it doesn't compile under VS2008 Pro"Unknown compiler version - please run the configure tests and report the results"I looked around on the boost site but couldn't find any instructions on what I am meant to do...Only how to change stuff not add a new compiler/compiler version :(

I get that but it compiles fine, it's just a debug message spit out by the boost heades. What's the actual compilation error that you get?

##### Share on other sites
in the link stage I then get:
"LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc80-mt-gd-1_34_1.lib'"

That file seems to not even exist anywhere so I'm not sure what to do about it... I'm asuming it's linked to the warning/message I get before.

##### Share on other sites
Quote:
 Original post by Sync Viewsin the link stage I then get:"LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc80-mt-gd-1_34_1.lib'"That file seems to not even exist anywhere so I'm not sure what to do about it... I'm asuming it's linked to the warning/message I get before.

Kinda. Did you build the libraries with bjam? It ends up building with a slightly different tag (e.g. "vs"? instead of "vc80") for the old versions. This can be fixed by properly renaming the libraries in question, although you'll still get those warnings about unsupported compiler. Alternatively you could poke around in the config headers to find where it selects the identifier to use, and tweak it to use vc80 there.

I did the former (renamed the files via Ruby script) until I decided I wanted the svn trunk version for it's other as of yet unreleased updates, and it worked fine other than the "Unknown compiler version" message. (As already mentioned, svn trunk has been updated to do the right thing itselfTM, which means 1.35.0 -- whenever it's released -- shouldn't have this issue, if you're the patient type who'd rather just wait out for the next release).

##### Share on other sites
Can I have some step by step instructions cause like I said I don't have any libarys even remotly like the one it says it can't find...

I'm guesing I need to build something but there is 0 documentation on exacctly which downloads and what settings vs2008 needs....I'm guessing I need to use this bjam thing but there doesn't seem to be a windows binary and I don't understand how to make one....

for the timer game loop I just want a good way to do this that ensures the update function is called 50 times a second...Everywhere says that "QueryPerformanceCounter" is hardware dependent and things like GetTickCount seem to only be accurate to just over 15ms...
	while(GameRun)	{				while(PeekMessage(&Msg, NULL, NULL, NULL, PM_REMOVE))		{			if(Msg.message == WM_QUIT) GameRun = false;			TranslateMessage (&Msg);			DispatchMessage  (&Msg);		}				Update();//50 times a second		Render();//as fast as possible while keeping the update at 50 times a second	}

[Edited by - Sync Views on March 21, 2008 6:19:23 PM]

##### Share on other sites
I compiled from boost trunk using vs2008. use tortise svn as windows client to download. the trunk has the fix for vs2008 version and (at least) two other small source patches.

to create the libs i had to run bjam a couple of times - one for static and one for dll libs. for static lib's i had to add the following to fix a naming issue that would prevent linking in vs2008.

also add the 'stage' modifier as an argument to the bjam command which will move the compiled libs up to a top level directory boost. sorry if this is a bit unclear - as this is from memory since i dont have my notes with me as to precisely what i did. It took me a little bit of fiddling and googling but this was quicker than using the boost getting started documentation which is a bit to verbose and doesnt really contain the needed info for vs2008 since its not officially supported.