From: Andrew M. <and...@ho...> - 2003-04-26 12:58:16
|
I am still having problem with the header file. I just installed MinGW-2.0.0-3.exe. The command I use to compile the program is: gcc hello.c The error message I get is C:\model\amptobod>gcc hello.c hello.c:1:20: iostream: No such file or directory hello.c: In function `main': hello.c:4: parse error before ':' token hello.c:5:3: warning: no newline at end of file This is the program I am trying to run #include <iostream> int main() { std::cout << "Hello, world!" << std::endl; } I went into C:\MinGW\include\c++\3.2\backward and found that all the header file I need is in there. Thank you for all your helps. ----- Original Message ----- From: "Oscar Fuentes" <of...@wa...> To: <min...@li...> Cc: <and...@ho...> Sent: Friday, April 25, 2003 11:15 PM Subject: Re: [Mingw-users] header files > "Andrew Marcus" <and...@ho...> writes: > > > I am using Windows XP and I just installed mingw. I wrote a small program > > that use iostream.h; however, I have trouble compiling the program. I > > downloaded and placed iostream.h in the lib folder, > > Downloaded? From where? > > It is not a good thing to try to "fix" the compiler adding files hear > and there. Most likely you will add confussion to the scene. > > > but now the compiler is asking for a header file that iostream > > depends on. > > > > Are there any place where I can download all these header files? > > The MinGW package contains everything you need. The iostream.h header > is buried deep on a folder named 'backward', because the standard > header is 'iostream' (no .h). Note too that all Standard C++ Library > names are on namespace 'std'. Just after installing the MinGW package, > this should compile and execute correctly: > > #include <iostream> > > int main() { > std::cout << "Hello, world!" << std::endl; > } > > If it doesn't, copy&paste the command you used and the error messages, > also mentioning the compiler version you are using, and the names of > the packages you installed. > > -- > Oscar > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > |