Xref: news-dnh.mv.net comp.os.msdos.djgpp:3920 Path: news-dnh.mv.net!mv!barney.gvi.net!redstone.interpath.net!news.sprintlink.net!news.wwa.com!news From: car AT wwa DOT com (Chris A. Rodgers) Newsgroups: comp.os.msdos.djgpp Subject: Baffling compilation errors Date: Sat, 16 Dec 1995 14:54:41 GMT Organization: Somewhere Better Than MCSNet Lines: 81 Message-ID: <4aumi5$va@kirin.wwa.com> Reply-To: car AT wwa DOT com NNTP-Posting-Host: chi1-048.wwa.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, all! I am having trouble compiling c++ source after reinstalling my system. To show the error, I chose a simple old example. I have djgpp installed in e:\djgpp. I am passing the compilation parameter -lgpp, but I am getting unresolvced references of cin and cout. I am sure I am just missing something basic, but I went over the steps in the faq and everything still seems to be in order, but not working. Any suggestions? (email or news is fine) code:------------------------------------------ // myfirst.cpp--displays a message #include // a PREPROCESSOR directive int main(void) { cout << "Come up and C++ me some time."; cout << "\n"; return 0; } compile error messages:----------------------------- E:\DJGPP\SRC\cis_230\testbed1>gcc -v -lgpp myfirst.cpp -o myfirst Reading specs from e:/djgpp/lib\specs gcc version 2.6.3 e:/djgpp/bin\cpp.exe -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplu s -D__GNUC_MINOR__=6 -Dunix -Di386 -DGO32 -DMSDOS -D__unix__ -D__i386__ -D__GO32 __ -D__MSDOS__ -D__unix -D__i386 -D__GO32 -D__MSDOS myfirst.cpp e:/djgpp/tmp\cc0 08200 GNU CPP version 2.6.3 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: e:/djgpp/cplusinc e:/djgpp/include /usr/local/lib/g++-include /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.6.1/include /usr/include End of search list. e:/djgpp/bin\cc1plus.exe e:/djgpp/tmp\cc008200 -quiet -dumpbase myfirst.cc -ver sion -o e:/djgpp/tmp\cca08200 GNU C++ version 2.6.3 (80386, BSD syntax) compiled by GNU C version 2.6.3. e:/djgpp/bin\as.exe -o e:/djgpp/tmp\ccb08200 e:/djgpp/tmp\cca08200 e:/djgpp/bin\ld.exe -o myfirst e:/djgpp/lib\crt0.o -Le:/djgpp/lib -lgpp e:/djgp p/tmp\ccb08200 -lgcc -lc -lgcc myfirst.cc(.text+0x2e): undefined reference to `cout' myfirst.cc(.text+0x33): undefined reference to `ostream::operator<<(char const * )' myfirst.cc(.text+0x40): undefined reference to `cout' myfirst.cc(.text+0x45): undefined reference to `ostream::operator<<(char const * )' environment:--------------------------------- E:\DJGPP\SRC\cis_230\testbed1>set TMP=C:\WINDOWS\TEMP winbootdir=C:\WINDOWS COMSPEC=C:\WINDOWS\COMMAND\COMMAND.COM PROMPT=$P$G PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DOS;C:\BIN;C:\BIN_MKS;C:\BAT;E:\DJGPP\BIN LMOUSE=C:\MOUSE TEMP=C:\DOS QDOS=c:\qdc QLOG=c:\qdc OPTUNE=c:\qdc windir=C:\WINDOWS BLASTER=A220 I5 D1 DJGPP=e:/djgpp/djgpp.env GO32TMP=e:/djgpp/tmp CMDLINE=gcc -v -lgpp myfirst.cpp -o myfirst ---------------------------------------------------------------------- _ _ / |_ ._ o _ /\ |_) _ _| _ _ ._ _ Software Engineer \_| || |_> /--\o | \(_)(_|(_|(/_| _> car AT wwa DOT com _|