CodeBlocks linker issues?

I built Box2D using

Code: Select all

cmake -G "MinGW Makefiles" ..
mingw32-make


and there's a libBox2D.a in Box2D_v2.3.0\Box2D\Build\Box2D from building it.
So in my project I have set it up so that it links to the libBox2D.a file that was created

Image

So when I try to using CodeBlocks to build the project it complains that the objects can't find Box2D.

Image

Did I mess up building Box2D or did I link it wrong or something ❓

Any help would be appreciated 🙂
You could check that the library was built properly (includes all the source files it should). I'm not sure of the best way to check that on Windows, but as a basic check the file size should not be very tiny - I would expect a couple of hundred kb at least.
If that looks ok, try passing the verbose flag to the linker, so it will spew out details on all the little steps it does while looking for files to link with. Sometimes you can see that it found the file, but it was for a different architecture (eg. 32 bit libs will be skipped when linking a 64 bit executable), and there may be other reasons for skipping it. At least, that would let you confirm whether it actually finds the file you're specifying... if not double check the path etc 🙂

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