starcraft broodwar API (BWAPI) problem

I decided to play with this the other day -> http://code.google.com/p/bwapi/

I downloaded the latest version and tried to build the example AI only to end up drowning
in a bunch of linker errors, most of them being undefined reference to `BWAPI::Broodwar',
even if I link to every library in the package... What's going on here? Does anyone know?

I guess I'll just get VC++ 2008 Express (that's what they suggest) and try again, but
if anyone has experienced this before and is aware of a solution, I'd like to know it.
Last edited on
closed account (zb0S216C)
Generally, when you receive a linker error, it normally means that the linker can't find the definition of a function. Of course, you already know this.

What IDE are you using for this build?
Have you included the correct headers?
Is the code written in C?

Wazzak
I'm using Code::Blocks/g++. I just tried it with Visual C++ 2008 Express
(which is what they supposedly used to create the project) and, among other
things, I got an undefined reference error for a std::vector::operator[] call... -.-

Anyway, I tried to hack my way around it by providing an implementation for the
std::vector::operator[] using std::vector::at, which surprisingly suppressed the error!...

But then, when I tried to rebuild, I got an undefined reference for
the dereference operator of a const_iterator of a std::_Tree... -.-

Cool, eh?...
closed account (zb0S216C)
Strange. Why would a member of vector have an undefined reference? Here's obvious question: Is <vector> included?

Wazzak
Last edited on
Obviously. After all, it's a linker error. Ok, instead of trying to rebuild their project,
I created a new one, copy-pasted the code and set the include/lib paths.
Now, I'm getting errors very similar to the ones I got from the GNU linker.
Last edited on
Topic archived. No new replies allowed.