1

Needing to add the 64 bit version of the Ogre graphics engine (latest at the time of writing this post, i.e. 1.8.0), I've followed their hints and opened a visual c++ x64 command prompt and typed this:

  bjam --build-dir=vc10 --toolset=msvc-10.0 --address_model=64 --with-thread --with-date_time --build-type=complete stage

This is as far as I got with convincing boost to build lib objects for a 64 bit windows compiler. I am using Visual Studio 2010 Premium and the CMake tools to compile Ogre from sources. This is where things get nasty:

 Error  276 error LNK1104: cannot open file '..\..\lib\Debug\OgreMain_d.lib'    
 Error  119 error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'   

I fear I won't make it pass this issue any time soon as I'm totally unaccustomed to working with big code bases that rely heavily on dependencies that I have to, also, build from scratch. Could you please provide a hint or a link to something I might have missed? Thanks..

UPDATE There is a website containing the already built libraries, but it would be nice to learn why the --address-model and --address-space flags don't work. How else should one use bjam to build the libraries?

teodron
  • 1,410
  • 1
  • 20
  • 41

3 Answers3

2

There are a couple of errors in the bjam command. You don't want a -- in front of toolset or address-model, and address-model has a hyphen, not an underscore.

So the command you probably were aiming for is:

bjam --build-dir=vc10 toolset=msvc-10.0 address-model=64 --with-thread --with-date_time --build-type=complete stage
Fraser
  • 74,704
  • 20
  • 238
  • 215
  • Thanks, I think I need to do two things: get my eyes checked and correct the Ogre official tutorials (as they use --toolset). No wonder address_model was not recognized as a valid flag by _bjam_ – teodron Jun 08 '12 at 07:32
1

The first error is self explanatory - The lib file does not exist in the path specified. The second error indicates that you're building for 64-bit but one of the dependency libraries being used is compiled for 32-bit.

Superman
  • 3,027
  • 1
  • 15
  • 10
  • Quite clear about that, the first error might be a problem cause by the exact issue in my question: how to build those boost libraries for 64 bit compilers? although I've used the boost 'bjam' with the '--address_model=64' flag from within the MS VC prompt, it didn't produce '.libs' for a 64 bit target (I checked this with the 'dumpbin' utility). I think that if I get rid of the 64 vs 32 problem, I will solve it. – teodron Jun 07 '12 at 14:26
1

Try to download precompiled Boost binaries from there and install it into default location. This will make CMake to properly locate library and include dirs.

arrowd
  • 33,231
  • 8
  • 79
  • 110
  • I already did that, all of them are 32 bit. For the 64 bit I have found a version listed in [this](http://stackoverflow.com/questions/2322255/64-bit-version-of-boost-for-64-bit-windows) SO thread as an answer (the second I believe) – teodron Jun 07 '12 at 15:51