Page 1 of 1

Visual Studio 2008 Release Mode Build Failure

Posted: Tue Dec 04, 2012 9:16 pm
by c3lm4ta
Hi! I am trying to build BWAPI 3.7.4 with a fresh install of Visual Studio 2008 (Version 9.0.21022.8 RTM). Debug configuration builds successfully, however linker fails with the following message in Release mode:

Code: Select all

Creating library C:codesc1aiBWAPI 3.7.4ReleaseExampleAIModule.lib and object C:codesc1aiBWAPI 3.7.4ReleaseExampleAIModule.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Generating code
Finished generating code
fatal error C1047: The object or library file '.ReleaseAIModuleLoader.obj' was created with an older compiler than other objects; rebuild old objects and libraries
LINK : fatal error LNK1257: code generation failed

Build Log @pastebin

Any ideas?

Posted: Tue Dec 04, 2012 9:20 pm
by DaveChurchill
Seems to me you have some stale files in your Release folder. Try rebuilding, or deleting your Release folder and trying again.

Posted: Tue Dec 04, 2012 9:30 pm
by c3lm4ta
Thanks for the reply :) This was my initial suspicion as well, yet the same error occurs when building a fresh copy of BWAPI.

Posted: Wed Dec 05, 2012 2:10 am
by c3lm4ta
Turns out, for whatever reason, a fresh build of everything was required.
The following steps correct this issue:

  • Resolve external BWTA dependencies
    1. Boost 1.4.0
    2. CAGL 3.5.1
    3. Download http://bwta.googlecode.com/files/compiler_config.h
    4. Add the following lines to compiler_config.h, unless you have support for std::tuple or std::tr1::tuple, which I don't seem to with my msvc2008 express release... and we already have tuple with boost. Of course, this is probably not correct, so use at your own risk. Please let me know if there is a better way of resolving this issue.

      Code: Select all

      #define CGAL_CFG_NO_CPP0X_TUPLE 1
      #define CGAL_CFG_NO_TR1_TUPLE 1

    5. Download & build tinyxml

  • Checkout & build BWTA

    - You will notice a stale reference to tinyxml project in the solution, just remove and ignore it for now.
  • Checkout & build BWAI

Of course, it is totally possible I have made this much harder on myself by not understanding the typical build processes used by BWAI devs... if this is in fact the case, please enlighten me to the correct process after you have finished laughing /wink.gif' class='bbc_emoticon' alt=';)' />