Code blocks does not work

Projekt:Trisquel
Version:6.0
Komponente:Programs
Kategorie:Aufgabe
Priorität:minor
Zugewiesen:nicht zugewiesen
Status:active
Beschreibung

Hi
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.

Thanks
Hardisk

sirgazil (nicht überprüft):
Fr, 10/08/2010 - 01:31

It happens in Trisquel too.

Fr, 10/08/2010 - 11:05

Fix : sudo apt-get install build-essential

The packet should be auto installing the basic C libraries

Fr, 03/23/2012 - 08:08
Kategorie:Fehlerbericht» Aufgabe
Priorität: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 (nicht überprüft):
Sa, 03/02/2013 - 23:22
Projekt:Trisquel mini» Trisquel
Version:» 6.0
Komponente: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

Workaround

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

sudo apt-get install build-essential