Jump to content

  • Log In with Google      Sign In   
  • Create Account


Trouble getting boost library


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 BaneTrapper   Members   -  Reputation: 1108

Like
0Likes
Like

Posted 25 March 2013 - 04:33 AM

Hello.

I am currently trying to build my own boost library for VS2012 and i just struggle to find a tutorial or just way its done.

I found how its don't on 2010,2011, but i just cant get it to build.

Anyone knows a page where its explained how to get boost running for VS 2012? how to build it, is what i need. I don't think i will have trouble using it.


Edited by BaneTrapper, 25 March 2013 - 04:34 AM.

Current projects:
The Wanderer, 2d turn based rpg style game

www.gamedev.net/topic/641117-check-up-the-wanderer/


Sponsor:

#2 BitMaster   Crossbones+   -  Reputation: 3659

Like
1Likes
Like

Posted 25 March 2013 - 06:04 AM

When installing MSVC there will generally be something like "Visual Studio XXXX Command Prompt" in your start menu. Use it, unlike a normal shell it will have the MSVC executables in the path and probably include several environment variables not normally set. Boost will use them to detect the compiler.
Navigate to the directory where you have unpacked Boost. Call bootstrap to build bjam. Then actually compile boost. How you actually do that is a question of what exactly you need, one of my lines is
bjam --stagedir=. --build-dir=./build-dir variant=release,debug threading=multi link=static runtime-link=static,shared --toolset=msvc stage
But that's basically just following what is already described on the Boost page on how to build it.

#3 BaneTrapper   Members   -  Reputation: 1108

Like
0Likes
Like

Posted 25 March 2013 - 06:17 AM

When installing MSVC there will generally be something like "Visual Studio XXXX Command Prompt" in your start menu. Use it, unlike a normal shell it will have the MSVC executables in the path and probably include several environment variables not normally set. Boost will use them to detect the compiler.
Navigate to the directory where you have unpacked Boost. Call bootstrap to build bjam. Then actually compile boost. How you actually do that is a question of what exactly you need, one of my lines is

bjam --stagedir=. --build-dir=./build-dir variant=release,debug threading=multi link=static runtime-link=static,shared --toolset=msvc stage
But that's basically just following what is already described on the Boost page on how to build it or what each setting means so i could build appropriately for me it.

I couldn't find how to build it on their home page. If you could refer me what each setting means so i could build appropriately for me it.

 

What i need is dynamic debug and release. for other settings i am unfamiliar what is their purpose.

Or is boost only static so i cant build dynamically?

 

EDIT:: Found this page

http://www.boost.org/boost-build2/doc/html/bbv2/overview/invocation.html thanks google.

Its building will see if its of any use


Edited by BaneTrapper, 25 March 2013 - 06:28 AM.

Current projects:
The Wanderer, 2d turn based rpg style game

www.gamedev.net/topic/641117-check-up-the-wanderer/


#4 BitMaster   Crossbones+   -  Reputation: 3659

Like
1Likes
Like

Posted 25 March 2013 - 06:24 AM

I highly doubt you want dynamic debug and release. You probably want a debug and release build using the dynamic runtime, not having a DLL for each of Boost's sublibraries. In this case the line you probably want is
bjam --stagedir=. --build-dir=./build-dir variant=release,debug threading=multi link=static runtime-link=shared --toolset=msvc stage
which will have to do a bit less work compared to the above line.

Edit: For the record, the official build tutorial is here while an explanation of the parameters is here.

#5 SiCrane   Moderators   -  Reputation: 9387

Like
0Likes
Like

Posted 25 March 2013 - 07:29 AM

Personally, I don't bother building boost separately. For the libraries that aren't header only I just add the relevant source files from libs/<whatever>/src to my project. This requires uncommenting the #define BOOST_ALL_NO_LIB line in boost/config/user.hpp or adding the equivalent line for the specific library like python or filesystem. For completeness for some libraries you can also get a preprocessor definition to disable dllexport on functions, but this isn't necessary for compilation.

#6 BaneTrapper   Members   -  Reputation: 1108

Like
0Likes
Like

Posted 25 March 2013 - 07:39 AM

I highly doubt you want dynamic debug and release. You probably want a debug and release build using the dynamic runtime, not having a DLL for each of Boost's sublibraries. In this case the line you probably want is

bjam --stagedir=. --build-dir=./build-dir variant=release,debug threading=multi link=static runtime-link=shared --toolset=msvc stage
which will have to do a bit less work compared to the above line.

Edit: For the record, the official build tutorial is here while an explanation of the parameters is here.

I will try that out thanks.

 

My build problem. I tried to include #include <boost\filesystem.hpp> this is output

1>------ Build started: Project: Test, Configuration: Debug Win32 ------
1>  main.cpp
1>LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc110-mt-gd-1_53.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

 

 

EDIT::
What i asked how to copy files around at this post. http://www.gamedev.net/topic/640771-coping-files-around-help/

Best answer was using boost::filesystem.

 

I only need boost::filesystem part. Its cross platform so i decided to use it.

I currently have .dll files from other libs i am using so it wouldn't be problem including those i need in as well.

 

I just don't want issues for people if they will want to play the game i am making as(downloading and installing components because game wont run) i try to provide everything. Here starts the problem, i don't know what are advantages and disadvantages of static or dynamic libs or with sould i use in this case.

 

If you wanna help guide me id be much biggrin.png. Else i will just do with what i have.


Edited by BaneTrapper, 25 March 2013 - 07:52 AM.

Current projects:
The Wanderer, 2d turn based rpg style game

www.gamedev.net/topic/641117-check-up-the-wanderer/


#7 BitMaster   Crossbones+   -  Reputation: 3659

Like
1Likes
Like

Posted 25 March 2013 - 07:52 AM

Either you have not compiled Boost properly for the configuration you are using or the Boost libraries are not in your library search path.

#8 BaneTrapper   Members   -  Reputation: 1108

Like
0Likes
Like

Posted 25 March 2013 - 09:03 AM

Either you have not compiled Boost properly for the configuration you are using or the Boost libraries are not in your library search path.

I got it working.

Thanks on the build settings it works. Guessing link had to be static not shared.


Current projects:
The Wanderer, 2d turn based rpg style game

www.gamedev.net/topic/641117-check-up-the-wanderer/





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS