I think I found out where the problem is.
When I use the terminal the compilation command is:
clang++ -std=c++11 -stdlib=libc++ -g <filename>.cpp -o <filename>
This command make an executable file if compilation pass.
In case of C::B, first of all created objective file, and only after that executable is created.
There are two commands in C::B:
- first for compilation and creation of objective file
- second for linking
#1 clang++ -std=c++11 -stdlib=libc++ -g -c <filename>.cpp -o obj/Debug/<filename>.o
#2 clang++ -o /bin/debug/<filename> obj/Debug/<filename>.o
The command in 2-nd line created by C::B automaticly.
Based on attached Error Log file, it can be seen that errors start to appear after command in 2-nd line.
I belive that automaticly created command in 2-nd line, should look like following:
clang++ obj/Debug/<filename>.o -o /bin/debug/<filename>
Currently I have no accesses to PC with installed Clang.
Today at evening I will check this option using command line.
[attachment deleted by admin]
Hi jarod42,
Thank you for advice.
The flag -stdlib=libc++ is compiler's and linker's option.
The code is get compiled and runs after addition of flag -stdlib=libc++ to Compiler settings -> Other options and Linker settings -> Other linker options in C::B.
The compilation and linking options in C::B are following:
Compilation: clang++ -stdlib=libc++ -std=c++11 -g -c <filename>.cpp -o obj/Debug/<filename>.o
Linking: clang++ -stdlib=libc++ obj/Debug/<filename>.o -o /bin/debug/<filename>
Via terminal is almost (except path) same command:
Compilation: clang++ -stdlib=libc++ -std=c++11 -g -c <filename>.cpp -o <filename>.o
Linking: clang++ -stdlib=libc++ <filename>.o -o <filename>
Thank you for ideas.