delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/01/20:15:20

Xref: news2.mv.net comp.os.msdos.djgpp:5565
From: "Sb" <sboivin AT uqac DOT uquebec DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: stl and djgpp?
Date: Mon, 1 Jul 1996 19:13:05 -0400
Organization: Universite du Quebec a Chicoutimi
Lines: 26
Message-ID: <01bb67a2.ddf05a60$1379d484@sboivin>
NNTP-Posting-Host: sboivin.uqac.uquebec.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi, I'm new to DJGPP (v2). I compiled some elementary 
C++ programs without problem, but I was unable to 
compile (link) this one which use STL:

#include <stl.h>
#include <iostream.h>
int main() {
  vector<int> v(5);
  for (int i = 0; i < v.size(); i++) v[i] = i + 1;
  cout << "v[1] = " << v[1] << "\n";
  return 0;
}  

gxx test.cc reply:
  
test.cc(.text+0xa9f): undefined reference to 'operator 
new(unsigned long,void *)'

Actually, the same program compile and run correctly 
on my SUN workstation using gcc 2.7.2.

Did I missed something or did DJGPP cannot support 
STL?
                                      Thanks.
Sylvain Boivin
sboivin AT uqac DOT uquebec DOT ca

- Raw text -


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