From: hirsch@molinette.unito.it
Subject: Newbie STL pain
17 Nov 1996 10:44:58 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199611171744.JAA08308.cygnus.gnu-win32@cygnus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: hirsch@golgi.molinette.unito.it
X-Mailer: Windows Eudora Light Version 1.5.2
Original-To: gnu-win32@cygnus.com
Original-Sender: owner-gnu-win32@cygnus.com

I am using b14 to learn a little about the stl and recently I found myself
unable to link even very simple multifile programs such as:

//file 1 "test.h"
#ifndef TEST_H
#define TEST_H

#include <stl.h>
#include <iostream.h>

class test
{
public:

vector <int> v;

push();
};

#endif

//file 2
#include "test.h"

test::push()
{
v.push_back(1);
cout << "push" << endl;
};

//file 3

#include "test.h"

void main()
{
test t;

t.push();
};

The files compile OK but the linker complains about multiple declarations of
static objects (allocators found in vector.h).

Why does it not link? 
Anyone has a suggestion?

Thank you very much,

Emilio Hirsch

Hirsch@golgi.molinette.unito.it

-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
