Comments (8)
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.
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.
his pastebin maybe useful http://pastebin.com/EVsEmkaG
from hxcpp.
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.
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.
Added
-D HXCPP_GCC
and code seems to work I did not for terminal c++ need GCC_OLD
from hxcpp.
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.
I think the config provides the solution. Closing this one now.
from hxcpp.
Related Issues (20)
- wasm is not working with hxcpp HOT 2
- NME Android build error
- String::create(wchar_t* ...) is broken on non Windows systems
- Adding support for vs 2022
- HXCPP_API_LEVEL 300 Cleanup HOT 1
- GC Pinning HOT 4
- How to properly shutdown a hxcpp DLL?
- Casts inserted and I don't know why HOT 2
- FreeBSD, Could not find include file "toolchain/null-toolchain.xml" HOT 1
- Strange CPP error HOT 2
- Pointer_obj::ofArray changes length of empty array from 0 to 1
- Allow using system sqlite?
- Linking issue on HXCPP_MINGW under MSYS2 HOT 2
- Cannot have an array of pointers HOT 2
- hxcpp does not quote -I paths with spaces
- Explicitly allow c++14
- Abstract wrapping extern cannot find the extern
- thread count discrepancy in extern-use test
- @:generic ignores @:unreflective HOT 5
- Reflect.field(String, "fromCharCode") doesnt work
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 hxcpp.