User forums > Using Code::Blocks

Code::Blocks and clang on Debian

(1/5) > >>

Poenikatu:
Hello. I have just started learning C++ from Bjarne's book The C++ Programming Language (4th edition). I am using it
because it teaches C++11. My system is Debian GNU/Linux x86_64 with kernel 3.2.0-4-amd64. Yesterday, I succeeded
in compiling the LLVM/Clang++ compiler from scratch (using gcc for the 1st stage). The 2nd stage involved recompilation
using Clang++ itself resulting in a binary which is 3Mb smaller. I have also compiled the new libc++ library and used it
successfully for one small program.

I intend using Code::Blocks for all my C++ work, but I notice that Code::Blocks does not yet have support for Clang++.
I' d very much like to know how to support the LLVM compiler because it implements the whole of C++11.

golgepapaz:

--- Quote from: Poenikatu on July 20, 2013, 05:32:38 am ---
I intend using Code::Blocks for all my C++ work, but I notice that Code::Blocks does not yet have support for Clang++.
I' d very much like to know how to support the LLVM compiler because it implements the whole of C++11.

--- End quote ---

I am sure that  C::B support clang.Have a look at Settings->Compiler. There is a entry
called llvm clang compiler. You can adjust it to point your newly compiled clang and make it
the default compiler for your projects.

Poenikatu:
As you said, there is an entry for LLVM Clang, but the commands issued by Code::Blocks are either overly complicated
or just plain wrong. The program is only 11 lines long. The Code::Blocks controlled build produces a binary which
fails with a Segmentation violation, whereas the command-line compilation/linking runs without errors. And, when I
try to run the target from within C::B, the loader cannot find the libc++ library (whose directory *is* in my
LD_LIBRARY_PATH).

Jenna:
Please do not use the Welcome newcomers therad for posting other stuff than saying hello.
I created this topic for your clang/llvm disscussion.

oBFusCATed:
How about telling us your version of C::B? Have you tried a night build?
Also it would have been good if you've posted some build logs.

Navigation

[0] Message Index

[#] Next page

Go to full version