[nme] cannot use box2d

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[nme] cannot use box2d

kabutoboy
This post has NOT been accepted by the mailing list yet.
hi!

i tried to use box2d in my project using nme to compile "sudo haxelib run nme test App.nmml flash"
then i got an error "<box2d-path>/box2D/dynamics/B2Body.hx:35: characters 0-41 : Class not found : box2d.dynamics.joints.B2JointEdge"

my Main file is very simple

package com.kabutoboy.test;

import box2D.dynamics.B2World;

class Main {
        public inline static function main() {
                trace("helloworld");
        }
}

it seems like a box2d cant import a class from the box2d package

please help ...
Reply | Threaded
Open this post in threaded view
|

Re: [nme] cannot use box2d

alexbor
kabutoboy wrote
hi!

i tried to use box2d in my project using nme to compile "sudo haxelib run nme test App.nmml flash"
then i got an error "<box2d-path>/box2D/dynamics/B2Body.hx:35: characters 0-41 : Class not found : box2d.dynamics.joints.B2JointEdge"

my Main file is very simple

package com.kabutoboy.test;

import box2D.dynamics.B2World;

class Main {
        public inline static function main() {
                trace("helloworld");
        }
}

it seems like a box2d cant import a class from the box2d package

please help ...
Package names are case-sensitive. Error message contains lower case "box2d" but folder name and main class import both contain "box2D" with a capital "D". This is the first thing that I would check.
Reply | Threaded
Open this post in threaded view
|

Re: [nme] cannot use box2d

kabutoboy
This post has NOT been accepted by the mailing list yet.
This post was updated on .
You're right!

Some box2d classes import by using "box2d" as a package name and some use "box2D"
But the right one is "box2D"

And some classes defined the package name to "box2d.xxx"

Thanks! I'm gonna edit the file myself.