Message-ID: <000b01be2a44$8237f2c0$1de410ac@nilesh> From: "nilesh" To: Cc: "nilesh n chavan" Subject: Can't make .exe Date: Thu, 17 Dec 1998 23:08:52 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0008_01BE2A12.36CC7720" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.0518.4 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0518.4 Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_0008_01BE2A12.36CC7720 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi,=20 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 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 *)' ------=_NextPart_000_0008_01BE2A12.36CC7720 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
I compiled the = following code (the=20 first one in c++) to get a .o file but could not link it to make an EXE = file.=20 Pl. help.
 
 
First.cpp:

#include <iostream.h>

main()

{

cout << "This is my first C++ program.";

return 0;

}

Command Line = :
C:\>gcc -o first.exe = first.o=20 -L/djgpp/gcc281b/bin
 
Error:

first.o: In = function=20 `main':
c:\first.cpp:1: undefined reference to=20 `cout'
c:\first.cpp(.text+0x2e): undefined reference to=20 `ostream::operator<< (char const *)'
------=_NextPart_000_0008_01BE2A12.36CC7720--