From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wei Xu" To: "Jonathan Pryor" , Subject: Re: gcc library Date: Wed, 07 Jul 1999 07:55:00 -0000 Message-id: <008f01bec888$9535efc0$c3dba1d1@Xu.toronto.vr1.com> X-SW-Source: 1999-07/msg00129.html Thanks for your reply. Your example works with g++. When I use gcc, still the same mistake: undefined reference. -----Original Message----- From: Jonathan Pryor To: Wei Xu ; cygwin@sourceware.cygnus.com Date: Wednesday, July 07, 1999 10:40 AM Subject: Re: gcc library > doesn't provide the prototype for printf. >You need to include . > >Also, the use of has been deprecated by >the C++ standard. You should use , which >places everything in the std namespace. Additionally, > has been deprecated in favor of , >which also places the contents into the std namespace; >however, not all compilers support , so I tend >to stick with ... > > // example.... > #include > #include > > using namespace std; > > int main () > { > cout << "Hello, world!\n"; > printf ("Hello again, world!\n"); > return 0; > } > > - Jon >----- Original Message ----- >From: Wei Xu >To: >Sent: Wednesday, July 07, 1999 10:15 AM >Subject: gcc library > > >> Dear all, >> >> I an new to this software. I have download the full verions of Cygwin. >When >> I try to testing the = >> gcc with the following C++ code: >> >> #include >> >> int main (int argc, char **argv) >> { >> cout << "Hello world\n"; >> printf("Hello world\n"); >> } >> >> >> It says: >> >> try.cc: In function `int main(int, char **)': >> try.cc:6: warning: implicit declaration of function `int printf(...)' >> C:\WINDOWS\TEMP\ccz14xFI.o(.text+0x1e):try.cc: undefined reference to = >> `cout' >> C:\WINDOWS\TEMP\ccz14xFI.o(.text+0x23):try.cc: undefined reference to = >> `ostream:: >> operator<<(char const *)' >> collect2: ld returned 1 exit status >> >> I can figure out what is wrong with my installation or library?=20 >> Here is my set: >> > > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wei Xu" To: "Jonathan Pryor" , Subject: Re: gcc library Date: Sat, 31 Jul 1999 18:34:00 -0000 Message-ID: <008f01bec888$9535efc0$c3dba1d1@Xu.toronto.vr1.com> X-SW-Source: 1999-07n/msg00129.html Message-ID: <19990731183400.ktOUkNF1I39xqE9T0H6Ak4DNUFWPO0q0L4AqG8vN2oI@z> Thanks for your reply. Your example works with g++. When I use gcc, still the same mistake: undefined reference. -----Original Message----- From: Jonathan Pryor To: Wei Xu ; cygwin@sourceware.cygnus.com Date: Wednesday, July 07, 1999 10:40 AM Subject: Re: gcc library > doesn't provide the prototype for printf. >You need to include . > >Also, the use of has been deprecated by >the C++ standard. You should use , which >places everything in the std namespace. Additionally, > has been deprecated in favor of , >which also places the contents into the std namespace; >however, not all compilers support , so I tend >to stick with ... > > // example.... > #include > #include > > using namespace std; > > int main () > { > cout << "Hello, world!\n"; > printf ("Hello again, world!\n"); > return 0; > } > > - Jon >----- Original Message ----- >From: Wei Xu >To: >Sent: Wednesday, July 07, 1999 10:15 AM >Subject: gcc library > > >> Dear all, >> >> I an new to this software. I have download the full verions of Cygwin. >When >> I try to testing the = >> gcc with the following C++ code: >> >> #include >> >> int main (int argc, char **argv) >> { >> cout << "Hello world\n"; >> printf("Hello world\n"); >> } >> >> >> It says: >> >> try.cc: In function `int main(int, char **)': >> try.cc:6: warning: implicit declaration of function `int printf(...)' >> C:\WINDOWS\TEMP\ccz14xFI.o(.text+0x1e):try.cc: undefined reference to = >> `cout' >> C:\WINDOWS\TEMP\ccz14xFI.o(.text+0x23):try.cc: undefined reference to = >> `ostream:: >> operator<<(char const *)' >> collect2: ld returned 1 exit status >> >> I can figure out what is wrong with my installation or library?=20 >> Here is my set: >> > > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com