HXCPP Missing linker "static"

187 views
Skip to first unread message

Dean Nicholls

unread,
Oct 30, 2012, 12:09:06 PM10/30/12
to haxe...@googlegroups.com
Hi,

I have some nme native extensions that have been built around the time of nme's 3.4.0 release with hxcpp 2.10. These were built using:

haxelib hxcpp "Build.xml" -Diphoneos -DHXCPP_ARMV7

On my mac osx lion machine running xcode 4.3.2, and all was well.

I've come today to rebuild these native extensions on a mac running osx mountain lion, with xcode 4.5.1, haxe 2.10, nme 3.4.4, hxcpp 2.10.2, and am now getting lots of the following error:

Called from ? line 1
Called from BuildTool.hx line 1301
Called from BuildTool.hx line 567
Called from a C function
Called from BuildTool.hx line 604
Called from BuildTool.hx line 738
Called from BuildTool.hx line 820
Uncaught exception - Missing linker :"static"

Is there something I've misses/not installed in order to get these native extensions building?

Below is the Build.xml file I'm using for one of the extensions which is failing to build:
<xml>

    <set name="GCC_THIN_ARCHIVE" value="1" if="iphone"/>

    <include name="${HXCPP}/build-tool/BuildCommon.xml"/>

    <set name="mobile" value="1" if="iphone"/>
    <set name="mobile" value="1" if="android"/>
    <set name="mobile" value="1" if="webos"/>

    <set name="SLIBEXT" value=".lib" if="windows"/>
    <set name="SLIBEXT" value=".a" unless="windows"/>
    <set name="SLIBEXT" value=".so" if="webos"/>

    <files id="iphone">
        <compilerflag value="-Iinclude"/>
        <file name="iPhone/ExternalInterface.mm"/>
        <file name="iPhone/ShareInterface.mm"/>
        <file name="iPhone/ShareDelegate.mm"/>
    </files>

    <set name="tool" value="exe" unless="iphone"/>
    <set name="tool" value="static" if="iphone"/>

    <set name="ndll-tool" value="dll" unless="iphone"/>
    <set name="ndll-tool" value="static" if="iphone"/>
<set name="name_extra" value=".iphoneos-v7" if="iphoneos"/>
<set name="name_extra" value=".iphoneos" if="iphoneos" unless="HXCPP_ARMV7" />
    <set name="name_extra" value=".iphonesim" if="iphonesim"/>

    <set name="no_thirdparty_extras" value="1" if="iphone"/>

    <set name="sdl_static" value="1" unless="mobile"/>
    <unset name="sdl_static" if="dynamic_sdl"/>
    <set name="no_thirdparty_extras" value="1" if="dynamic_sdl"/>

    <set name="name_prefix" value="lib" if="iphone" />

    <target id="NDLL" output="${name_prefix}share${name_extra}" tool="linker" toolid="${ndll-tool}">
        <outdir name="../ndll/${BINDIR}" />
        <ext value=".ndll" unless="mobile"/>
        <files id="iphone"/>
    </target>

    <target id="default">
        <target id="NDLL"/>
    </target>

</xml>

Any help with this would be greatly appreciated :)

Thanks,
Dean

Hugh

unread,
Oct 31, 2012, 12:55:49 AM10/31/12
to haxe...@googlegroups.com
Hi,
"static" was changed to "static_link" recently to avoid clashed with the haxe compiler.

So you may need to change this line:

<set name="tool" value="static" if="iphone"/>

to this:

<set name="tool" value="static_link" if="iphone"/>

Hugh

Dean Nicholls

unread,
Oct 31, 2012, 7:51:52 AM10/31/12
to haxe...@googlegroups.com
That worked great, thanks Hugh.
Reply all
Reply to author
Forward
0 new messages