Sender: nate AT cartsys DOT com Message-ID: <367AED9A.6575DFE7@cartsys.com> Date: Fri, 18 Dec 1998 16:04:42 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.35 i486) MIME-Version: 1.0 To: djgpp AT delorie DOT com CC: nilesh n chavan Subject: Re: Can't make .exe References: <000b01be2a44$8237f2c0$1de410ac AT nilesh> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com > nilesh wrote: > > Hi, > I compiled the following code (the first one in c++) to get a .o file > but could not link it to make an EXE file. Pl. help. > > > First.cpp: > > #include > > main() > > { > > cout << "This is my first C++ program."; > > return 0; > > } > > Command Line : > C:\>gcc -o first.exe first.o -L/djgpp/gcc281b/bin As README.1ST tells you, use `gxx' to link C++ programs instead of `gcc'. And don't post in HTML. > Error: > > first.o: In function `main': > c:\first.cpp:1: undefined reference to `cout' > c:\first.cpp(.text+0x2e): undefined reference to `ostream::operator<< > (char const *)' -- Nate Eldredge nate AT cartsys DOT com