User forums > General (but related to Code::Blocks)

Definition of libc++ library with Clang compiler in Code::Blocks on Ubuntu Linux

<< < (2/2)

jarod42:
I would say that -stdlib=libc++ is a *linker* option.

ptolomey:
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:

--- Code: ---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>  

--- End code ---

Via terminal is almost (except path) same command:

--- Code: ---Compilation: clang++ -stdlib=libc++ -std=c++11 -g -c <filename>.cpp -o <filename>.o
Linking:     clang++ -stdlib=libc++ <filename>.o -o <filename>  

--- End code ---

Thank you for ideas.

Navigation

[0] Message Index

[*] Previous page

Go to full version