1

I'm trying to compile a Haxe file into a cpp executable using hxcpp as provided by running terminal command ~ haxelib Install hxcpp

However, upon compilation I get this error

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

I know cc1plus is the actual compiler for the g++ driver so I have provided my version info

g++ --version

i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.`

I am running MacOsX 10.7.5

Gama11
  • 31,714
  • 9
  • 78
  • 100
  • possible duplicate of [Unrecognized Command Line Option '-stdlib=libc++' with MacPorts gcc48](http://stackoverflow.com/questions/24419832/unrecognized-command-line-option-stdlib-libc-with-macports-gcc48) – user657267 Feb 04 '15 at 08:43
  • @user Similar and useful yes. As explained in that post the `-stdlib` flag is a clang flag rather than a gcc flag. However, in this case, I am not calling the gcc compiler. I am calling `hxcpp` which in turn calls `Xcode` which then calls `gcc`. That post describes it as a linking error. But if the entire compilation is handled through Xcode (assumption) then how can there be a linking error? Bottom line, the `hxcpp haxelib` seems to work for others so there must be something specific to my machine that is hindering it. I figure it is out of date software but am having a hard time confirming. – Kris Kringle Feb 04 '15 at 09:05

1 Answers1

0

Update to g++ 5.0.0 and everything will work