Hi,
I succefully compiled Box2D after following the CMake and VS project steps and got the box2d.lib file.
Now in my project I've set the box2d.lib file as an additional dependency for the linker and made sure Visual Studio finds it. However, I keep getting the LNK2019 error, unresolved external symbol, as follows:
I've searched through 8+ pages of the forum and around google, and found nothing. Can't understand what I'm doing wrong, I followed these steps:
- Download Box2D_v2.1.2.zip and extract it.
- Run Cmake-gui as explained in the .txt file.
- Open the solution, set Box2D as startup project, and press F7 (generate).
- Grab the box2d.lib file at the Debug directory (I'm compiling my project as Debug right now) and put it on one of the VS default library directories (did same thing for other libraries and worked fine, may the mistake be here?).
- Set the include directories.
- Add box2d.lib as additional dependency on the project.
Can anyone spot any mistake among those steps? Must be a silly thing, but can't find it.
Thank you very much for your help, I appreciate it a lot.
I succefully compiled Box2D after following the CMake and VS project steps and got the box2d.lib file.
Now in my project I've set the box2d.lib file as an additional dependency for the linker and made sure Visual Studio finds it. However, I keep getting the LNK2019 error, unresolved external symbol, as follows:
Code:
error LNK2019: unresolved external symbol "public: __thiscall b2World::b2World(struct b2Vec2 const &,bool)" (??0b2World@@QAE@ABUb2Vec2@@_N@Z)
error LNK2019:unresolved external symbol "public: void __thiscall b2World::Step(float,int,int)" (?Step@b2World@@QAEXMHH@Z)
error LNK2019: unresolved external symbol "public: class b2Body * __thiscall b2World::CreateBody(struct b2BodyDef const *)" (?CreateBody@b2World@@QAEPAVb2Body@@PBUb2BodyDef@@@Z)
error LNK2019:unresolved external symbol "public: void __thiscall b2World::Step(float,int,int)" (?Step@b2World@@QAEXMHH@Z)
error LNK2019: unresolved external symbol "public: class b2Body * __thiscall b2World::CreateBody(struct b2BodyDef const *)" (?CreateBody@b2World@@QAEPAVb2Body@@PBUb2BodyDef@@@Z)
I've searched through 8+ pages of the forum and around google, and found nothing. Can't understand what I'm doing wrong, I followed these steps:
- Download Box2D_v2.1.2.zip and extract it.
- Run Cmake-gui as explained in the .txt file.
- Open the solution, set Box2D as startup project, and press F7 (generate).
- Grab the box2d.lib file at the Debug directory (I'm compiling my project as Debug right now) and put it on one of the VS default library directories (did same thing for other libraries and worked fine, may the mistake be here?).
- Set the include directories.
- Add box2d.lib as additional dependency on the project.
Can anyone spot any mistake among those steps? Must be a silly thing, but can't find it.
Thank you very much for your help, I appreciate it a lot.