🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42131

g++ problems

#42131
From: Richard Davies
Date: Sun, 14 Jan 1996 00:00
28 lines
1136 bytes
I know I must be missing something trivial, but cannot see what it is.  The 
problem is this.

I am running gcc 2.7.0 on LINUX, FREEBSD and OS/2 WARP.  I have no problem 
compiling C programs, but there is a problem with C++.

After installing the compiler, I tested it with a trival C++ program

#include<iostream.h>

int main()

{
     cout << "Hi\n";
     return 0;
}
It compiles, but the linker complains with error messages

     undifined reference to _cout....
     undifined reference to _ostream...
I can compile to object code using gcc -c silly.cpp
to get silly.o, so the problem seems to be with the linker not the compiler.
What am I doing wrong here!!!!

Thanks.

Richard
United Arab Emirates University
Technical Details
Message-ID: <30FA7B53@pcmail.uaeu.ac.ae>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,6ac332d8b73a0645,start
X-Google-Attributes: gid11318c,public
From: m507@ugru.uaeu.ac.ae (Richard Davies)
Subject: g++ problems
Date: 1996/01/14
Message-ID: <30FA7B53@pcmail.uaeu.ac.ae>
X-Deja-AN: 135159560
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
newsgroups: gnu.gcc.help