Jump to content
  • Advertisement
Sign in to follow this  
Deadlybones

Boost-Library compatibility?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello there. Here's a copy of my post from the SFML forums. I removed the SFML specific questions that have been solved but I'm still having problems:

I've recently added boost multi arrays to my project but there is a problem. Boost multi array apparently has some sort of problem iterating in VS10 so resizing them isn't working. After some googling, I have found that adding "_ITERATOR_DEBUG_LEVEL=0" to the preprocessor definitions. This seemed to fix that error but then I get an "Unhandled exception at 0x5b2137ff (msvcr100d.dll) in Game.exe: 0xC0000005: Access violation reading location 0xcccccccc." at an earlier spot that only happens when I try to load a texture from SFML.
EDIT:I can create a texture however when I try to do if (!currentTexture.LoadFromFile("blah.jpg"))
then I get a runtime error and it opens fopen.c and apparently it stopped at if(*file==_T('\0'))
{
errno=EINVAL;
return NULL;
}





Also, apparently changing to release mode can fix boost multi array but I get a fatal error and it takes me to base.hpp and on line 136 it says BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]);


1.How do I get the boost multi array library to work when adding _ITERATOR_DEBUG_LEVEL=0 breaks SFML and boost multi array resizing won't work without it? The whole reason why I'm using them in the first place is so I can resize arrays. Also, these library issues are putting me behind schedule :/

I can also post the source code if needed but it's not organized wonderfully right now :)

Share this post


Link to post
Share on other sites
Advertisement
Hidden
Can you recompile SFML? Trying to link code using one configuration (version, iterator debugging level, etc) of the CRT with code using another is going to give you all sorts of problems.

Share this post


Link to post
Microsoft regards this issue as a bug in boost::multi_array (see here) so it is not going to be fixed in a service pack. Basically, the only way to use the current version of multi_array with VS2010 in debug mode is to alter your boost headers i.e. do what "istanbul.tr" says to do in this thread. Personally I'd just use something else.

Share this post


Link to post
Share on other sites
Yeah that's unfortunate :/ Anyways, I fixed release mode so I know that everything should work. I'll try that other workaround right now(I think I tried it before but I might have accidentally not saved it or restarted my solution etc.). If that doesn't work then I'm saying bye-bye to boost multi array.

EDIT:Yeah I'll just use a different multi array library. It's a bit annoying after all the trouble I had getting boost to work in the first place but maybe I'll need a boost library down the line. If anyone knows any good multi array libraries then feel free to let me know. I guess I'll just start trying some and see what works for me...something I should have done days ago.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!