This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Simple hello world in C++
- To: cygwin at cygwin dot com
- Subject: Simple hello world in C++
- From: Patrick Lightbody <plightbo at cisco dot com>
- Date: Tue, 20 Feb 2001 19:19:57 -0800
I'm trying to compile a simple "Hello World" using the latest build tools
in cygwin, but with the -mno-cygwin option so that the resulting object
does't require the cygwin1.dll:
#include <iostream.h>
int main(void) {
std::cout << "Hello!\n";
return 0;
}
The program works fine when doing just "g++ test.cpp", but when I do "g++
-mno-cygwin test.cpp" I get this error:
In file included from
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../include/g++-3/streambuf.h:36,
from
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../include/g++-3/iostream.h:31,
from test.cpp:1:
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../include/g++-3/libio.h:30:
_G_config.h: No such file or directory
I made a symlink of /usr/include/_G_config.h to /usr/include/g++-3, but I
still get errors. I could continue to make symlinks, but that doesn't seem
like the right answer to me. What am I missing? Thanks.
-Pat
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple