1

In my pretty default Debian install:

devsys@zotac:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.4 (wheezy)
Release:    7.4
Codename:   wheezy

I used apt-get install clang to do a default install of the Clang compiler.

devsys@zotac:~$ clang --version
Debian clang version 3.0-6.2 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: i386-pc-linux-gnu
Thread model: posix

devsys@zotac:~$ which clang
/usr/bin/clang

Then I do apt-get install codeblocks to do a default install of the Code::Blocks IDE.

devsys@zotac:~$ which codeblocks
/usr/bin/codeblocks

When starting up, and in its about box, Code::Blocks (CB) reports its version as 10.05

CB did not mention clang when it started up and there is nothing in the CB log about clang.

In the Compiler and Debugger Settings->Global Compiler Settings->Selected Compiler I have what looks like the standard CB compiler selections (and these are also the only ones I can see when I create a new project):

  • GNU GCC Compiler
  • Intel C/C++ Compiler
  • SDCC Compiler Tiny C Compiler
  • GDC D Compiler
  • Digital Mars D Compiler
  • GNU ARM GCC Compiler
  • GNU AVR GCC Compiler
  • GNU GCC Compiler for Power PC
  • GNU GCC Compiler for TriCore

Under Compiler and Debugger Settings->Global Compiler Settings->Toolchain executables->Program Files->C Compiler, when I open up the file browser I can scroll up and see clang and clang++ under /usr/bin. So theoretically I can create a profile for clang, but my understanding is that CB should be able to do this for me.So:

  1. Is there a way to get Code::Blocks to pick up on my Clang install?

  2. If there is no automatic way, what is the proper way to manually tell Code::Blocks about Clang?

  3. How should I have done the installation?

11
  • Can you say more about what Code::Blocks is? Is this a library? Is it packaged for Debian? If so, what is the name of the package? If not, how did you install it? Apr 21, 2014 at 14:32
  • @FaheemMitha See edits
    – Peter M
    Apr 21, 2014 at 15:11
  • Which version of Debian is this, please? Wheezy, testing/jessie, unstable? Apr 21, 2014 at 15:12
  • I can't reproduce this problem in my slightly non-standard setup of Debian wheezy, with a self backport of clang 3.4 and codeblocks from wheezy backports. You might be better off asking on a support forum for codeblocks. Apr 21, 2014 at 15:55
  • Also, if you do figure it out, it is a good idea to post your answer here. Self-answering is encouraged. Apr 21, 2014 at 16:05

1 Answer 1

1

The possible solution would be to update Code::Blocks to the latest version. In Code::Blocks 13.12 clang is listed as one of the supported compilers.

1
  • Thanks for that, but the project I was working on died, so I haven't had to touch that system in months :-(
    – Peter M
    Sep 11, 2014 at 20:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .