armory3d / haxebullet

Bullet 3D Physics for Haxe
http://bulletphysics.org
zlib License
94 stars 21 forks source link

Wrong path to bullet .h files generated #1

Closed vujadin closed 9 years ago

vujadin commented 9 years ago

Hi, on my machine I have haxe 3.1.3 and hxcpp 3.2.81 and this line in Bullet.hx:

@:include("LinearMath/btVector3.h")

generates this line in Main.cpp file:

#include <LinearMath/btVector3.h.h>    // (note the double .h.h !!)

Removing ".h" from @:include generates correct path in Main.cpp.

It would be nice if you could create a simple test project that will show us the right way of haxebullet usage. How do you integrate it into your build process without having to manually change stuff for every different cpp target ?

luboslenco commented 9 years ago

Hello,

The @:include macro should be fine, it is strange that double .h is generated.

The easiest way to get it up and running is with Kha as it also includes library file for it. However I understand not everyone whats to use that, that's why I kept it free of any dependencies.

To be honest I do not have much experience using hxcpp on it's own. It should work perfectly across all cpp targets without modification.

I will try to have a look at hxcpp, if you get any further please let me know. Would be cool to make it accessible to everyone using Haxe.

vujadin commented 9 years ago

You're using Haxe 3.2.0. The problem was in Haxe 3.1.3 which generated aditional ".h". They've changed how @:include works in new Haxe.

luboslenco commented 9 years ago

Thanks for notice, I have updated readme file.

However, where did you get this info? There doesn't seem to be any mention in changelog. There is also similar library for newton physics and the include macro is the same: https://github.com/dazKind/hx-newton/blob/master/hxnewton/Newton.hx

Wish there was more documentation regarding Haxe and C++.