Problem using b2djson RUBE loader

General discussion about the R.U.B.E editor
Post Reply
pwitulski
Posts: 8
Joined: Sat Aug 17, 2013 4:48 pm

Problem using b2djson RUBE loader

Post by pwitulski »

Hello,

I am in the process of trying to get my some of my RUBE scenes running using cocos2d-x. I am using a fairly up to date developer version but regardless it still uses Box2D version 2.2.1. The c++ loader uses the b2MotorJoint so I tried just updating the Box2D files to 2.3.0 in the template but I get errors.

Is the problem that the loader uses 32-bit c++ code to read and manipulate the data and it crashes because I am compiling my app in 64-bit?

Here is my compiler error log:

"b2MotorJoint::GetMaxForce() const", referenced from:
b2dJson::b2j(b2Joint*) in b2dJson.o
"b2MotorJoint::GetMaxTorque() const", referenced from:
b2dJson::b2j(b2Joint*) in b2dJson.o
"b2MotorJoint::GetAngularOffset() const", referenced from:
b2dJson::b2j(b2Joint*) in b2dJson.o

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Problem using b2djson RUBE loader

Post by iforce2d »

Sounds like you just need to add the b2MotorJoint.cpp file to the project.
pwitulski
Posts: 8
Joined: Sat Aug 17, 2013 4:48 pm

Re: Problem using b2djson RUBE loader

Post by pwitulski »

Got it fixed.

I did have to add the new sources to my compile list.

Weird how other libraries that relied on Box2D lost a link to common files and I had to explicitly add the search path to the folder even though it worked before I upgraded to the newer Box2D version.

Anyways, it works.

Thank you.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Problem using b2djson RUBE loader

Post by iforce2d »

Those files did not exist in the older Box2D version, so they did not really lose a link, rather it was never there to begin with.
Post Reply