Problem, building BWAPI source?
Posts: 13
Joined: Thu Jan 28, 2010 8:32 pm

Problem, building BWAPI source?

Postby Nuclear » Mon Feb 22, 2010 1:58 pm

Hi, I need to rebuild the source ( ) of BWAPI,
because there are some changes, for example this:, but my BWAPI is older: BWAPI_Beta_2.6.1

So, I download the source, using svn, open the project bwapi (not bwapi3) with MS Visual C++ Express Edition, build it in "Release" mode, but i get some errors:

Code: Select all

4>Performing Pre-Build Event...
4>The system cannot execute the specified program.
4>Project : error PRJ0019: A tool returned an error code from "Performing Pre-Build Event..."
4>Project : warning PRJ0018 : The following environment variables were not found:
4>Build log was saved at "file://e:Gamesbwapi-read-onlybwapiBWAPIReleaseBuildLog.htm"
4>BWAPI - 1 error(s), 0 warning(s)

I tried in "Debug" mode, but again I get errors:

Code: Select all

4>util.lib(Exceptions.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
4>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library

After that, 2 files appear in bwapiRelease: BWAPI.lib and Util.lib. I copy them in BWAPI_Beta_2.6.1/lib/, replacing the original files. (BWAPI_Beta_2.6.1 is the exampleAiModule, downloaded from here: ( Then I rebuld my ExampleAiModule (maybe to accept the new BWAPI.lib and Util.lib), but when I run it, there are no changes... like I haven't rebuild the BWAPI source. I'm sure, because I modified one of the text messages, but in the game I receive the old text message.
I actually don't know, if I'm doing it right, because I couldn't find documentation, how to build it, but i want to test, if the changes work.
Posts: 254
Joined: Thu Dec 18, 2008 12:42 pm

Postby krasi0 » Tue Feb 23, 2010 8:52 am

I haven't tried to compile it in a while but regarding the high APM behaviour have a look at
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Thu Feb 25, 2010 6:31 pm

That error is obvious. If the environment variable "(ChaosDir)" doesn't exist, then make it yourself. Apparently someone removed the step for adding the environment variable for building bwapi.
Posts: 13
Joined: Thu Jan 28, 2010 8:32 pm

Postby Nuclear » Thu Feb 25, 2010 9:46 pm

Yes, I succeeded building BWAPI, but I have the problem, described here:
Do I need to rebuild BWTA? I tried, but I need 4-5 additional libraries. I got some of them, but I get errors like "cannot access protected member declared in class 'CGAL::Segment_Delaunay_graph_2" If BWTA will fix the crash, i'll get all needed to rebuild it.
User avatar
Posts: 92
Joined: Sat Jun 21, 2008 11:50 pm

Postby lowerlogic » Thu Mar 04, 2010 9:39 pm

To build BWTA you need to go into file segment_delaunay_graph_2.h, edit line 1237 and replace "protected" with "public".

Return to “BWAPI (wrappers in other languages / questions and announcements related to BWAPI itself)”

Who is online

Users browsing this forum: No registered users and 1 guest