GithubHelp home page GithubHelp logo

lime cpp target? about haxebullet HOT 7 CLOSED

Ohmnivore avatar Ohmnivore commented on August 19, 2024
lime cpp target?

from haxebullet.

Comments (7)

luboslenco avatar luboslenco commented on August 19, 2024

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.

Ohmnivore avatar Ohmnivore commented on August 19, 2024

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.

luboslenco avatar luboslenco commented on August 19, 2024

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.

Ohmnivore avatar Ohmnivore commented on August 19, 2024

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.

Ohmnivore avatar Ohmnivore commented on August 19, 2024

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.

Ohmnivore avatar Ohmnivore commented on August 19, 2024

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.

luboslenco avatar luboslenco commented on August 19, 2024

Closing down, also linked this issue to the readme as others may find it helpful.

from haxebullet.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.