c++ compling error
Mumit Khan
khan@xraylith.wisc.EDU
Tue Aug 31 23:49:00 GMT 1999
"Namsuk Kim" <nskim@wa.freei.net> writes:
> hi,
>
> I have just installed gygnus. However, when I test gcc with a simple "hello
> world" gives "undefined reference to 'cout' error.
>
> #include <iostream>
> void main()
^^^^
int is the only allowed return type.
^^^^
> {
> cout << "hello world\n";
> }
>
> mingw32 gives the same result. Version doesn't seem to be the matter.
> Waiting for your help.
Use c++, not gcc; and, while you're at it, fix your code to change
void->int for main() return type (see any decent C++ text, such as
Stroustrup 3rd Ed.).
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list