LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem in C compiler (http://www.linuxquestions.org/questions/linux-newbie-8/problem-in-c-compiler-458205/)

tirtha 06-25-2006 02:04 PM

Problem in C compiler
 
When I try to compile any program in C it does well in Gnome, but the same program is not being compiled in KDE , why ? it gives an error :
cc: installation problem, cannot exec `cc1': No such file or directory
Plz help me out.
thank you

$cat>hello.c
#inchude<stdio.h>
#include<conio.h>
main()
{
printf(" Hello World");
return 0;
}
$ cc -o hello.out hello.c
>>>> Here comers the error, which is given above
>>>> A program was compiled before as first.out, the compiler is not able to compile again the first.c file but can execute the first.out file !

burntfuse 06-25-2006 02:17 PM

Could you give an example of exactly what you type in the terminal and the program you're building? (try something simple like a hello world program)

btmiller 06-25-2006 05:56 PM

Also, conio.h is an MS-DOS/Windows header file. It won't work on Linux. The Linux equivalent is the ncurses library. Besides, in the program you give you don't need it anyway as you just call the standard library funtion.

As for your problem, cc1 should be provided by the standard gcc package. What happens if you type the command "locate cc1"?

Pravab 07-04-2006 10:57 AM

LINUX doesnot take "conio.h" header file : and the rest program seems fine

Also while compiling
$ cc -o hello.out hello.c

i think u dont need to type hello.out
$ gcc -o hello hello.c
$./hello


All times are GMT -5. The time now is 10:20 AM.