Code blocks does not work

Attribué:Non assigné

I installed Code:blocks from the terminal
When I compile the C example program ( A simple Hello World) , here is what I get :

-------------- Build: Debug in test ---------------

Compiling: main.c
/home/hardisk/Documents/C/test/main.c:1:19: error: stdio.h: Aucun fichier ou dossier de ce type
/home/hardisk/Documents/C/test/main.c:2:20: error: stdlib.h: Aucun fichier ou dossier de ce type

Thoose errors mean in english : File not found

It seems that basics C libraries are not installed with the package, they are on Ubuntu.

I set this bug to "critical" because the application is useless if you can't code with it.


sirgazil (non vérifié):
ven, 10/08/2010 - 02:31

It happens in Trisquel too.

ven, 10/08/2010 - 12:05

Fix : sudo apt-get install build-essential

The packet should be auto installing the basic C libraries

ven, 03/23/2012 - 09:08
Catégorie:Rapporter un bogue» Tâche
Priorité:critical» minor

Changing this from a critical bug to a minor task. I believe the user just wants the build-essential package to be listed as a dependency for the code blocks package.

However a critical bug for an individual package does not necessarily constitute a critical bug for Trisquel (unless it causes Trisquel to not operate normally).

sirgazil (non vérifié):
dim, 03/03/2013 - 00:22
Projet:Trisquel mini» Trisquel
Version:» 6.0
Composant:Miscellaneous» Programs

I still have this problem in Trisquel 6.0.

Steps to reproduce the error

  1. Install Code::Blocks IDE using "Add/Remove applications".
  2. Open Code::Blocks IDE and select File -> New -> Empty file
  3. Write the following C program:

    #include <stdio.h>
    int main(void)
        printf("Hello, world!\n");
        return 0;
  4. Save the file as "hello.c".
  5. Click the "Build and run" button on the toolbar.

Expected behavior

After following the steps above, a console should appear and display the following text:

Hello, World!

Process returned 0 (0x0) execution time : 0.001s
Press ENTER to continue

Unexpected behavior

After following the steps above, you see the following in the "Build log" tab located in the "Log & others" section:

Compiling: /path/to/hello.c
Linking console executable: /path/to/hello
/bin/sh: 1: g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings


As suggested before, installing the "build-essential" package fixes the problem.

sudo apt-get install build-essential