From: donho AT altern DOT org (Don HO) Newsgroups: comp.os.msdos.djgpp Subject: My GCC does not compile the C++ source Message-ID: <398f215c.35904767@news.free.fr> X-Newsreader: Forte Free Agent 1.11/32.235 Lines: 74 Date: Mon, 07 Aug 2000 20:48:49 GMT NNTP-Posting-Host: 212.27.50.176 X-Complaints-To: abuse AT proxad DOT net X-Trace: nnrp6.proxad.net 965681329 212.27.50.176 (Mon, 07 Aug 2000 22:48:49 CEST) NNTP-Posting-Date: Mon, 07 Aug 2000 22:48:49 CEST Organization: Guest of ProXad - France To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, There is no problem to compile a C source for my GCC. The file below was compiled without problem : #include int main() { printf("Hello World\n"); } But it doesn't work with this one : #include int main() { int x; cin >> x; cout << "Hello, World! I am " << x << " Today!" << endl; } After executing "redir -o gcc.log -eo gcc -v ccaa.cc", the contenent of gcc.log is : Reading specs from d:/langages/c__~1/djgpp/lib\specs gcc version 2.7.2.1 d:/langages/c__~1/djgpp/bin\cpp.exe -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 ccaa.cc d:/langages/c__~1/djgpp/tmp\ccbaaaaa GNU CPP version 2.7.2.1 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: d:/langages/c__~1/djgpp/lang/cxx d:/langages/c__~1/djgpp/include d:/langages/c__~1/djgpp/contrib/grx20/include /usr/local/lib/g++-include /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.7.2.1/include /usr/include End of search list. d:/langages/c__~1/djgpp/bin\cc1plus.exe d:/langages/c__~1/djgpp/tmp\ccbaaaaa -quiet -dumpbase ccaa.cc -version -o d:/langages/c__~1/djgpp/tmp\cccaaaaa GNU C++ version 2.7.2.1 (80386, BSD syntax) compiled by GNU C version 2.7.2.1. d:/langages/c__~1/djgpp/bin\as.exe -o d:/langages/c__~1/djgpp/tmp\ccdaaaaa d:/langages/c__~1/djgpp/tmp\cccaaaaa d:/langages/c__~1/djgpp/bin\ld.exe d:/langages/c__~1/djgpp/lib\crt0.o -Ld:/langages/c__~1/djgpp/lib d:/langages/c__~1/djgpp/tmp\ccdaaaaa -Tdjgpp.djl -lgcc -lc -lgcc d:/langages/c__~1/djgpp/tmp\ccdaaaaa(.text+0x2f):ccaa.cc: undefined reference to `cin' d:/langages/c__~1/djgpp/tmp\ccdaaaaa(.text+0x34):ccaa.cc: undefined reference to `istream::operator>>(int &)' d:/langages/c__~1/djgpp/tmp\ccdaaaaa(.text+0x3e):ccaa.cc: undefined reference to `endl(ostream &)' d:/langages/c__~1/djgpp/tmp\ccdaaaaa(.text+0x51):ccaa.cc: undefined reference to `cout' d:/langages/c__~1/djgpp/tmp\ccdaaaaa(.text+0x56):ccaa.cc: undefined reference to `ostream::operator<<(char const *)' d:/langages/c__~1/djgpp/tmp\ccdaaaaa(.text+0x61):ccaa.cc: undefined reference to `ostream::operator<<(int)' d:/langages/c__~1/djgpp/tmp\ccdaaaaa(.text+0x6c):ccaa.cc: undefined reference to `ostream::operator<<(char const *)' d:/langages/c__~1/djgpp/tmp\ccdaaaaa(.text+0x77):ccaa.cc: undefined reference to `ostream::operator<<(ostream &(*)(ostream &))' How can I do to make it work? Thanks. Je bouffe donc je chie