Closed eduardodoria closed 3 months ago
I was getting this error when build in Windows:
error LNK2019: unresolved external symbol "public: class b2Joint * __cdecl b2World::CreateJoint(class b2JointDef const *)"
As you can see in this job: https://github.com/supernovaengine/supernova/actions/runs/5994348679/job/16255853451
I discovered the problem was in b2JointDef. After changed include order in box2d.h, putting joints before body, it worked. I don't know why.
b2JointDef
box2d.h
#include "b2_distance_joint.h" #include "b2_friction_joint.h" #include "b2_gear_joint.h" #include "b2_motor_joint.h" #include "b2_mouse_joint.h" #include "b2_prismatic_joint.h" #include "b2_pulley_joint.h" #include "b2_revolute_joint.h" #include "b2_weld_joint.h" #include "b2_wheel_joint.h" #include "b2_body.h" #include "b2_contact.h" #include "b2_fixture.h" #include "b2_time_step.h" #include "b2_world.h" #include "b2_world_callbacks.h"
Linux and Mac are ok in any order.
Closing out v2 issues since it is no longer supported.
I was getting this error when build in Windows:
error LNK2019: unresolved external symbol "public: class b2Joint * __cdecl b2World::CreateJoint(class b2JointDef const *)"
As you can see in this job: https://github.com/supernovaengine/supernova/actions/runs/5994348679/job/16255853451
I discovered the problem was in
b2JointDef
. After changed include order inbox2d.h
, putting joints before body, it worked. I don't know why.Linux and Mac are ok in any order.