![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Problem compiling program | rochitsharma | High Level Programming | 28 | 07-23-2006 08:56 PM |
| Error Compiling C program | Vivek | High Level Programming | 3 | 10-25-2001 11:13 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Compiling a program
Hello. I am trying to run a c program on a unix shell (ssh). I have searched this forum but have not come accross the soultion to my problem, so I am posting my question here
I wrote the following simple code: #include <iostream.h> using namespace std; int main() { cout << "\nThis is our first C++ prgram."; cout << "\nIt works!!!"; return 0; } I saved this in a file called first.c I entered command gcc first.c I get error "first.c:1: iostream.h: No such file or directory" I dont understand, does the gcc compiler not come with standard headers such as iostream and iomanip? |
|
||||
|
Minnesota Red,
I'm not sure if this would solve your problem, but check your LD_LIBRARY_PATH. This would be different depending on your OS. It seem to me that your "env" variable may not include the system standard library path. Try > env|grep LIBRARY, then chek each directory to see if the library is there. You may just be missing the library in general. If on a linux platform try >locate ipstream.h. If you get a result then that mean you have some other problem. Larry |
|
||||
|
OS is winxp, but I am using ssh to compile. I dont know if that makes much difference. I am a newbie, so I did not follow what you were saying.
BTW, Mod can U move this to correct forum. I just realized I posted this in wrong area by accident. Last edited by Minnesota Red; 06-16-2003 at 02:42 PM.. |
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|