0

After using make command the following error occurs. I followed SO page Mac Error: Undefined symbols for architecture x86_64, but could not solve that.

- cc1plus: error: unrecognized command line option '-std=c++11'
    -cc1plus: error: unrecognized command line option '-std=c++11'
    -cc1plus: error: unrecognized command line option '-stdlib=libc++'
-make[1]: *** [src/util/CommandOptions.lo] Error 1
-make[1]: Leaving directory `/home/saddam/softwareforsphinx/MIT-Language-Modeling-Toolkit'`enter code here`
make: *** [all-recursive] Error 1``
Community
  • 1
  • 1
  • 1
    Based on your pathnames it doesn't look to me like you're running on a Mac system, so following instructions for solving problems on a Mac system (which uses Clang as it's compiler, not GCC as most GNU/Linux systems do) will generally not be successful. What operating system do you use? What is the compiler line that is showing that error? What version of compiler do you have installed? Note that C++11 might be supported by your compiler if it's too old. – MadScientist Apr 23 '15 at 23:52
  • i am using the ubuntu and compiler is g++ – sadam hussain Apr 27 '15 at 07:41
  • Yes, but what _version_ of g++? What _version_ of Ubuntu? – MadScientist Apr 27 '15 at 12:50
  • gcc (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1 – sadam hussain Apr 27 '15 at 13:09
  • hello can any one answer my above question to get me out of problem – sadam hussain May 02 '15 at 07:21
  • GCC 4.8.1 supports the `-std=c++11` flag, so there must be a different problem. It looks as if your compiler is not installed properly: did you install it using your OS package manager or did you install it yourself somehow? You still didn't give your OS version but it seems like it might be Ubuntu 12.04; if so the version of GCC that comes with that compiler is GCC 4.6.2... how did you get 4.8.1? Also, the `-stdlib=libc++` is not a valid GCC flag, that is an LLVM/Clang flag, so you'll have to remove that to use GCC. – MadScientist May 02 '15 at 11:36
  • i have ubuntu version 12.04 i dont know its default gcc version but i have updated gcc many times which were required to work on diffrent lm toolkits therefore know version is 4.8.1 its gcc version i have updated the gcc using apt-get update gcc command or something like that i have installed srilm and irstlm they are working quite right but they dont give dictionary for language model there fore i am working on this can you tell me the exact version which could help me to solve the problem i have removed stdlib as you sugested which is for mac but no progress thanks for your answer – sadam hussain May 02 '15 at 12:42
  • I can't give you more help because, as I said, GCC 4.8.1 does support this option and you have GCC 4.8.1. So something else must be wrong. What is the full compile line, not just the errors (please edit your question, rather than put in the comments)? But either your compiler is not installed properly, or your command line is wrong, or something in your environment is wrong. You can try adding the `-v` option to the command line and GCC will print out the full path of all the commands it invokes; make sure that the path to the `cc1plus` looks right for your compiler version. – MadScientist May 02 '15 at 12:57

0 Answers0