The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compiling and Running C Program on Solaris selva_ss SUN Solaris 2 02-23-2008 12:02 PM
help on compiling a C program on Tiger cleansing_flame High Level Programming 4 01-29-2008 03:59 PM
Compiling a C program ooploo High Level Programming 3 10-06-2006 06:35 AM
Compiling a program Minnesota Red High Level Programming 7 06-16-2003 04:35 PM
Error Compiling C program Vivek High Level Programming 3 10-25-2001 11:13 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-28-2006
rochitsharma rochitsharma is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 82
Problem compiling program

hi
i am having a problem that when ever i use
cc program_name.c
to compile a program. an error occurs, showing cc not found.
please help.
  #2 (permalink)  
Old 04-28-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
type this command:
Code:
which cc
If you get no output, your path does not point to the directory with cc in it. I'm inclined to think you may have gcc instead - also try:
Code:
which gcc
  #3 (permalink)  
Old 04-29-2006
rochitsharma rochitsharma is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 82
the output of commands was:

# which cc
no cc in /usr/sbin /usr/bin
# which gcc
no gcc in /usr/sbin /usr/bin
#
  #4 (permalink)  
Old 04-29-2006
ranj@chn ranj@chn is offline Forum Advisor  
Playing with Ubuntu Now!
  
 

Join Date: Oct 2005
Location: Chennai
Posts: 365
search

Check if you have the cc/gcc installed. If it is so, the PATH variable is not poiniting to the directory where the compiler is located. You have to give the full path of the cc/gcc and try compiling or set the PATH variable to the location where it is and it should work.
  #5 (permalink)  
Old 04-30-2006
rochitsharma rochitsharma is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 82
cc was installed but now i don't have any idea of its location. could u help me locating and adding that location into path. Or can you tell me any address from where i can get this package
  #6 (permalink)  
Old 04-30-2006
ranj@chn ranj@chn is offline Forum Advisor  
Playing with Ubuntu Now!
  
 

Join Date: Oct 2005
Location: Chennai
Posts: 365
may not be installed

cc/gcc is typically installed in /usr/bin. I am not sure about your system. If you want to find where the compiler could be located, run a find command.
find / -name "cc" -print
Replace 'cc' with 'gcc' if that is the compiler in your system.
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0