Subject: how to avoid mulitple definitions of STL free_list, start_free, end_free,heap_size
From: [email-masked] (Stephen Reuss)

7 Dec 1997 07:29:37 -0800
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

First up, I dealt with the pair structure redeclaration issue by
renaiming the pair structure in the third party code to mespair.  If
anyone has ideas of how I can force compiler to choose one declaration
or another, please let me know.

The new problem regards the:
 multiple definition of `__default_alloc_template<false, 0>::start_free
                                                           ::end_free
                                                           ::heap_size
                                                           ::free_list

in linking a C++ program.  The link command is as follows:

g++ -o main -D__GNU_COMPILER -DWIN32 -D__CYGWIN32__ -O2  main.o
flowsolver.o gui.o graphics.o io.o parms.o mesh.o vert.o cell.o face.o
coef.o mgrid.o gridadapt.o   -L../lib -lglut -L../lib -lMesaGLU
-lMesaGL  /usr/Programs/Meschach/lib/meschach.a ../lib/wing32.a
-lkernel32 -luser32 -lgdi32  

Interrestingly, the above error is given while trying to link all but
the io.o and parms.o files.  I checked the included headers for these
files and they arent any different than headers included in other source
files.

And each of the object files was created using the command (eg.):

g++ -c -D__GNU_COMPILER -DWIN32 -D__CYGWIN32__ -O2 
-I/usr/Programs/Mesa-2.5/include  -I. -I/LIBS/mv++/include
-I/usr/Programs/Meschach/include main.c

>From what I understand, the compilation phase has created object files
each with the above memory definitions.  How can I get it not to do
that, if that is the case?  If not, can anyone shed some light?

Is there any way I can tell the linker its OK, and just use the most
recent definition?  They are presumably all identical.

Thanks in advance

-- 
---------------------------------------------------------------------
  Stephen Reuss                               =====  ======  =====
  M.A.Sc.  student, Mechanical Engineering   ==      ==      ==  ==
  University of Waterloo, Canada             =       =====   ==   =
  E-mail: [email-masked]        ==      ==      ==  ==
  Phone : (519)888-4567 X3859                 =====  ==      =====
  Fax   : (519)888-6197                         *** G R O U P ***
---------------------------------------------------------------------

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".