snowkit / hxcpp-guide

A guide for the Haxe CPP target build systems, CFFI and APIs
80 stars 8 forks source link

Adding simple cffi example. #5

Open jcward opened 8 years ago

jcward commented 8 years ago

Known issues to be reviewed:

ruby0x1 commented 8 years ago

Will have a closer look soon:

ruby0x1 commented 8 years ago
ruby0x1 commented 8 years ago
jcward commented 8 years ago

@underscorediscovery I defer to your experience on all counts. I was merely cobbling together something that built, based on Lars' SteamWrap and the old Haxe example (which has minimal build info).

I'll look into applying your notes this afternoon (~8 hours from now.)

ruby0x1 commented 8 years ago

No worries!

larsiusprime commented 8 years ago

Nicely done, once we have this we can add a few CFFI Prime examples too. Will be happy to get the build process isolated and explained.

jcward commented 8 years ago

Hmm, when I took out the explicit toolchain includes, I got:

>haxelib run hxcpp Build.xml
Error: Compiler element defined without 'exe' attribute included from:[Build.xml]

Ideas?

WRT $ORING -- oh, that's a Steam thing, right, and should be removed. It allowed SteamWrap to link in the steam libraries. Removed.

ruby0x1 commented 8 years ago

The rpath set to ORIGIN allows the executable typically to pick up libraries relative to the binary itself yea.

You aren't specifying a target to hxcpp so it's probably uncertain what to include, but specifying the explicit toolchains is definitely not what you do.

Try for instance haxelib run hxcpp Build.xml -Dlinux or android,mac,windows etc.