www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/05/14:29:04

From: Gallicus AT caramail DOT com (Gallicus)
Newsgroups: comp.os.msdos.djgpp
Subject: Help with C++ library
Date: Mon, 05 Apr 1999 09:34:19 GMT
Organization: Wanadoo - (Client of French Internet Provider)
Lines: 41
Message-ID: <370982e5.13785014@news.wanadoo.fr>
NNTP-Posting-Host: b-adsl-nice-1-62.abo.wanadoo.fr
Mime-Version: 1.0
X-Newsreader: Forte Agent 1.5/32.452
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I use the last version of Djgpp.
C programs works OK.

I am testing the C++ library.

To test the C++ I wrote :
#include <iostream.h>
int main() {
  int a = 100, b=200;
  cout << "Hello " << a + b << endl;
  return 0;
}
It works OK.

To test the  String C++ class I wrote: 
#include <iostream>
#include <_String.h>
int main() {
  String str = "Hello ";
  String str1 = "boys!";
  cout << str + str1 << endl;
  return 0;
}
Compiling is OK. Linking aborts.
I get : undefined reference to "String:: ...."

To test the C++ Integer class I wrote :
#include <Integer.h>
int main() {
  Integer a = 100;
  Integer b = 200;
  cout << a + b << endl;
  return 0;
}
Compiling is OK. linking aborts.
I get undefined reference to "Integer::..."

What is the problem ?

TIA.
Gallicus.

- Raw text -


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