Giter Club home page Giter Club logo

Comments (8)

hughsando avatar hughsando commented on May 31, 2024

Is this using LLVM or GCC? Is the solution to magically set HXCPP_GCC, or is it with an old version of llvm?

from hxcpp.

Justinfront avatar Justinfront commented on May 31, 2024

Another Lion user on IRC reported it was broken, I noticed the -m32 flag so they checked their processor and it was a 64 bit and I asked them to add
-D HXCPP_M64
but it still gave the error so I suggested they try adding
-D GCC_OLD
same error, so they checked out hxcpp 3.0.2 the version I had and that was working from git and their code now worked.
I checked out latest hxcpp and my build failed for the same reason eg:

haxelib run hxcpp Build.xml haxe -DGCC_OLD="1" -DHXCPP_M64="1" -DawdFile="suzanne.awd" -Dhaxe3="1" -Dhaxe_ver="3.1" -Dhxcpp_api_level="310" -DoutPutFile="summary.txt"
g++ -Iinclude -c -fvisibility=hidden -stdlib=libstdc++ -Qunused-arguments -O2 -I/usr/lib/hxlib/hxcpp/3,1,22//include -DHX_MACOS -m64 -Wno-parentheses -Wno-unused-value -Wno-format-extra-args -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=310 -x c++ -frtti ./src/targets/cpp/AwdCpp.cpp -oobj/darwin64//12569131_AwdCpp.o
cc1plus: error: unrecognized command line option "-stdlib=libstdc++"
Called from sys.io.Process::$statics line 1
Called from BuildTool::main line 2080
Called from BuildTool::$init line 916
Called from a C function
Called from BuildTool::new line 1009
Called from BuildTool::buildTarget line 1401
Uncaught exception - Error in building thread
Error: Build failed

They were running xcode 4.4.1 and I was running 4.2.1
So I compared the mac-toolchain.xml files and noticed line 15 was different did not bother to comment out latter occurrences since did not look like they were being used. This one line fixed the compile error.

His terminal reported gcc is
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

Mine is
gcc (MacPorts gcc46 4.6.3_9) 4.6.3
but maybe xcode uses a different one.

I am happy to test something but I am unable to answer your question, the hxml I used for my test is online but don't think that will help.

Best Justin

from hxcpp.

Justinfront avatar Justinfront commented on May 31, 2024

his pastebin maybe useful http://pastebin.com/EVsEmkaG

from hxcpp.

hughsando avatar hughsando commented on May 31, 2024

It looks like you might need HXCPP_GCC too. I guess this should be implied
by GCC_OLD maybe. If you can confirm that adding this HXCPP_GCC define
fixes things, I can look to add it for the GCC_OLD case. You could also
try adding this in your .hxcpp_config file.

On Fri, Mar 21, 2014 at 1:28 PM, Justinfront [email protected]:

his pastebin maybe useful http://pastebin.com/EVsEmkaG

Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-38250170
.

from hxcpp.

Justinfront avatar Justinfront commented on May 31, 2024

Hugh

What exactly does GCC_OLD handle, while I have 32bit processor running 64bit the other user had 64bit processor and Lion is not so old, should features missing on various mac systems not be automatically handled with try code rather than lumped together with an old flag?
I don't understand what I need to change, can you send me the patch file and I will apply it and test.

Best Justin

from hxcpp.

Justinfront avatar Justinfront commented on May 31, 2024

Added
-D HXCPP_GCC
and code seems to work I did not for terminal c++ need GCC_OLD

from hxcpp.

bapuna avatar bapuna commented on May 31, 2024

I've run into this problem on OSX Lion as well.

To be specific I was attempting to compile the native mac target using Snowkit which was failing with the following error:

cc1plus: error: unrecognized command line option "-stdlib=libstdc++"

It wasn't quite obvious how to fix the problem from the conversation, or at least not for someone like me who is pretty unfamiliar with Haxe. Anyway for the sake of anyone else who may run into a similar issue, here is one possible way you can fix it:

In your home directory you should find a file named .hxcpp_config.xml. You might need to enable visibility of hidden files in order to see it.

Open it up and add the following line somewhere between <section id="vars"> and </section>:

<set name="HXCPP_GCC" value="1" />

So after the change my entire .hxcpp_config.xml file looked like this:

<xml>

    <section id="vars">

        <set name="MAC_USE_CURRENT_SDK" value="1" />
        <set name="HXCPP_GCC" value="1" />
    </section>

</xml>

Compiling worked fine for me after that.

Thanks anyway guys :) I would not have had a clue without this conversation.

from hxcpp.

hughsando avatar hughsando commented on May 31, 2024

I think the config provides the solution. Closing this one now.

from hxcpp.

Related Issues (20)

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.