Comments (7)
Hey Ohmnivore,
I just found this topic, which talks about including this library(handy coincidence):
http://community.openfl.org/t/how-can-i-include-a-c-library-directory-to-hxcpp-build-process/1692/10
Is this helpful? There are some hxcpp tips included, will have to take a look too :)
from haxebullet.
I found it too, read it top to bottom but didn't understand anything xD. I'll try again tomorrow.
The @:buildXml tag looks interesting though.
from haxebullet.
Ah, should have thought so. I have no experience on this front since Kha handles it behind the scenes(directly when generating project file). Let me know if you figure it out, worst case we can try posting into that topic.
from haxebullet.
If I understand correctly the original poster ended up compiling the bullet sources as a dll and used them for linking. That still leaves me wondering how he included the header files in the preprocessor though.
I also looked at how koremake handles things and from what i've seen it includes the .cpp and .h files directly in the build process - much better than linking against a library imo. If it's possible in lime it would be the bee's knees.
I'll ask over there for sure.
from haxebullet.
I made a test with BtDiscreteDynamicsWorld, added the following right above its class definition. The header files are included, and the cpp stuff is compiled too. However for it to work we would have to add the same lines for every other class.
We could do it manually or I could attempt to make a build-time macro that would add these lines automatically from the existent @:include("BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h") tags.
Also does that break the koremake build process? It would be like adding everything in duplicate for a koremake build, so maybe it makes sense to add the @:buildXml stuff only if (for example) -DincludeBuildXml is defined.
@:buildXml("
<files id='haxe'>
<compilerflag value='-I${haxelib:haxebullet}/../cpp/bullet/'/>
<file name='${haxelib:haxebullet}/../cpp/bullet/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp'/>
</files>
<files id='__lib__'>
<compilerflag value='-I${haxelib:haxebullet}/../cpp/bullet/'/>
<file name='${haxelib:haxebullet}/../cpp/bullet/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp'/>
</files>
")
@:include("BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h")
@:keep
from haxebullet.
Done! https://gist.github.com/Ohmnivore/61897b4fc46170437776
I know a way (with lime.tools.PathHelper.getHaxelib) to make it so that lime automatically finds the sources in haxebullet's haxelib folder, but that would be terribly inconvenient for the snowkit folks :s
from haxebullet.
Closing down, also linked this issue to the readme as others may find it helpful.
from haxebullet.
Related Issues (14)
- Wrong path to bullet .h files generated HOT 3
- Managing pointers in cpp target HOT 9
- Collision callback HOT 2
- haxelib.json missing HOT 2
- error C2819: type 'btRigidBody' does not have an overloaded member 'operator ->' HOT 5
- calculateLocalInertia seems to have no effect HOT 5
- Crash on android HOT 4
- Need a little help with BtRigidBody plz HOT 2
- 'btRigidBody': no appropriate default constructor available HOT 4
- In the vehicle class not working of frictions HOT 1
- What Do We Need To Autogenerate Javascript Bindings? HOT 30
- [FR] Please include AllHitsRayResultCallback in haxelib HOT 8
- Readme test case HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haxebullet.