LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   GCC compailer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/gcc-compailer-611108/)

sunrajtech 01-04-2008 10:22 AM

GCC compailer
 
Hi,

i have try to open gcc in terminal command line there in type following
thing according to your reply.

fablab@fablab-desktop:~$ g++ hello.C -o hello
The program 'g++' can be found in the following packages:
* g++
* pentium-builder
Try: sudo apt-get install <selected package>
Make sure you have the 'universe' component enabled
bash: g++: command not found
fablab@fablab-desktop:~$


this error will be come you tell me which command use for open gcc compailer.

i have type in terminal gcc hello.c but come following message you tell me how do solve problem.

fablab@fablab-desktop:~$ gcc hello.c
gcc: hello.c: No such file or directory
gcc: no input files

regards,

sunrajtech.

Nylex 01-04-2008 10:40 AM

Quote:

Originally Posted by sunrajtech (Post 3011056)
Try: sudo apt-get install <selected package>

Have you tried this? You don't have g++ installed, hence why you get those messages.


Quote:

i have type in terminal gcc hello.c but come following message you tell me how do solve problem.

fablab@fablab-desktop:~$ gcc hello.c
gcc: hello.c: No such file or directory
gcc: no input files
Is your source file called hello.c or something else? The example I gave was just that: an example. You need to employ common sense and substitute file names in examples with the file names you're using. It also helps if you're in the same directory as your source code.

David1357 01-04-2008 10:43 AM

Quote:

Originally Posted by sunrajtech (Post 3011056)
fablab@fablab-desktop:~$ g++ hello.C -o hello

I see that your file has a ".C" (capital C) extension on this line.

Quote:

Originally Posted by sunrajtech (Post 3011056)
fablab@fablab-desktop:~$ gcc hello.c
gcc: hello.c: No such file or directory
gcc: no input files

In this command, you use a ".c" (small c) extension. Did you mistype the extension here?


All times are GMT -5. The time now is 01:52 PM.