Compiles for Linux, but not for Windows. (Linking Error)

Hey all.

I develop on Linux, and compile windows binaries from here using mingw32. I use GCC for all my compiling.

I compiled Box2D for both linux and windows (.a and .so) put them in the correct folders, put the "-lbox2d" tag into my makefiles, and it worked fine. Until, i put this line of code in

Code:
   pworld = new b2World(worldAABB, gravity, true);


at which point, it started coughing up compiler errors, (in the link stage). Note, that the linux version compiled fine, when i tried to compile for windows i got this

Code:
/tmp/ccJd63Hj.o:gmap.cpp:(.text+0x25b): undefined reference to `b2World::b2World(b2AABB const&, b2Vec2 const&, bool)'


So, im totally confused. Usually an error like this can be solved with changing the linking order in my makefiles, but not this time. Ill put my makefiles now.

Windows
Code:
all:

    i586-mingw32msvc-g++ -o bin/win/BlackAurora.exe Source/*.cpp  -lmingw32 -lSDLmain -lSDL -lSDL_image -mwindows -lopengl32 -lbox2d


Linux
Code:
all:

   g++ -o bin/linux/BlackAurora Source/*.cpp -lbox2d -lSDL -lGL -lSDL_image


Im totally stumped here. Any help?
Hi,

I have the exact same setup and it works fine here...
Are you sure you have the box2d.a(all lower case) file in usr/i586-mingw32-mcvs/lib (could differ a bit depending on your distro)
Apart from that there is not really anything that could go wrong...

Greetings Bob
Yeah. In that exact same folder i have "libbox2d.a".

Been trying to find a fix for this all day 🙁 Still nothing.
Hi,

(Sorry for my late reply : P.)
All right I know why it worked over here -.-.
I "accidentally" compiled the whole source so it didn't need to link box2d, I'm sorry for the false "it works fine here" hope.
And your right when I try to link the .a file it gives me with link errors.

Anyway would it be an option for you to just screw good practice and copy the source?

Greetings Bob.

Original thread: https://box2d.org/forum/viewtopic.php?t=951