The UNIX and Linux Forums  

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 09:02 AM
help on compiling a C program on Tiger cleansing_flame High Level Programming 4 01-29-2008 12:59 PM
Compiling a C program ooploo High Level Programming 3 10-06-2006 03:35 AM
Compiling a program Minnesota Red High Level Programming 7 06-16-2003 01:35 PM
Error Compiling C program Vivek High Level Programming 3 10-25-2001 08:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 04-28-2006
Registered User
 

Join Date: Feb 2006
Posts: 77
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.
Reply With Quote
Forum Sponsor
  #2  
Old 04-28-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,274
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
Reply With Quote
  #3  
Old 04-28-2006
Registered User
 

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

# which cc
no cc in /usr/sbin /usr/bin
# which gcc
no gcc in /usr/sbin /usr/bin
#
Reply With Quote
  #4  
Old 04-29-2006
Playing with Ubuntu Now!
 

Join Date: Oct 2005
Location: Chennai
Posts: 364
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.
Reply With Quote
  #5  
Old 04-30-2006
Registered User
 

Join Date: Feb 2006
Posts: 77
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
Reply With Quote
  #6  
Old 04-30-2006
Playing with Ubuntu Now!
 

Join Date: Oct 2005
Location: Chennai
Posts: 364
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.
Reply With Quote
  #7  
Old 05-11-2006
Registered User
 

Join Date: Feb 2006
Posts: 77
i used the find command and found
/usr/ucb/cc
/cc
/cc/SUNWspro/bin/cc
/cc/SUNWspro/SC4.2/bin/cc
/cc/SUNWspro/SC4.2/include/cc

please help
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0