I am trying to compile a program that has C++ 11 features. I should say that I first compiled it successfully on a Linux machine running Debian, using g++. I thought that getting the program to work on FreeBSD 9.1 would only require a few changes to my Makefile.
After changing my Makefile, clang is passed the options in the title header above. Using these options should enable 100% of the C++ 11 features. My program fails to compile with one fatal error:
At first, I thought well maybe the new standard libc++ has changed c++ and iostream is no longer used. So I looked for documentation on libc++ and could not find any.
On my system I found that libc++ is in /usr/src/contrib/libc++. I then included the path in my makefile. My program compiles, but I get this error:
How can I fix this?
After changing my Makefile, clang is passed the options in the title header above. Using these options should enable 100% of the C++ 11 features. My program fails to compile with one fatal error:
Code:
clang -std=c++11 -stdlib=libc++ ....
test.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
1 error generated.
At first, I thought well maybe the new standard libc++ has changed c++ and iostream is no longer used. So I looked for documentation on libc++ and could not find any.
On my system I found that libc++ is in /usr/src/contrib/libc++. I then included the path in my makefile. My program compiles, but I get this error:
Code:
/usr/bin/ld: cannot find -lc++
clang: error: linker command failed with exit code 1
How can I fix this?