www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/04/12:00:57

Message-Id: <s1b432a8.017@gov.ns.ca>
Date: Mon, 3 Jun 1996 11:52:13 -0300
From: Glenn Euloth <HLFXMARI DOT SSVS DOT EULOTHG AT gov DOT ns DOT ca>
To: djgpp AT delorie DOT com
Subject: Troubles with C++ compiling.

Troubles with C++ compiling.

I have just downloaded the C++ compiler in an effort to teach
myself some C++.  I have programmed in C before and thought I
should refresh my C memory and work on learning C++. After
downloading all the zip files that the readme (and the faq
recommend.  I keyed in a sample C++ program (from a text book);
here's the source:
========================================================
#include <iostream.h>

float answer;

main() {

    answer = 1/3;
    cout << "The value of 1/3 is " << answer << "\n";
    return(0);

}
=========================================================

I get the following results:
==========================================================
test.cc(.text+0x3d): undefined reference to `cout'
test.cc(.text+0x42): undefined reference to `ostream::operator<<(char
const *)'
test.cc(.text+0x4d): undefined reference to
`ostream::operator<<(float)'
test.cc(.text+0x58): undefined reference to `ostream::operator<<(char
const *)'
==========================================================

Can anyone tell me what is wrong???

Some things that may affect this: I am running a Pentium 133 with
Windows 95 (version 4.00.950).

Thanks in advance, Glenn

- Raw text -


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