cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/25/15:47:41

From: "Matthew Conte" <spam AT somebody DOT else>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: << operator
Date: Sat, 25 Apr 1998 15:47:52 -0400
Organization: Netcom
Lines: 25
Message-ID: <6hteer$oe8@sjx-ixn11.ix.netcom.com>
References: <2F9C872C00E8B4BE DOT 5D2FEA8B831C8BF4 DOT C7D3B02D31198014 AT library-proxy DOT airnews DOT net>
NNTP-Posting-Host: alb-ny3-22.ix.netcom.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>I got past the evil include thing;
>
>however when i try to compile/link this program this is the error I
>get:


When you compile C++ programs with gcc (rather than gxx / g++) you need to
explicitly specify to the linker that it should include the standard C++
libraries.

Do it like this:

    gcc test.cpp -o t -lstdcx

That should make it work.

>void main() {

Not critical, but main should be of type int, and it should return a value
(0 is a good one to pick for success).

Later,
Matt.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019