This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
how to avoid mulitple definitions of STL free_list, start_free, end_free,heap_size
- To: gnu-win32 at cygnus dot com
- Subject: how to avoid mulitple definitions of STL free_list, start_free, end_free,heap_size
- From: Stephen Reuss <sreuss at asc dot on dot ca>
- Date: Sun, 07 Dec 1997 10:05:55 -0500
- Organization: University of Waterloo
- Reply-To: sreuss at asc dot on dot ca
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: sreuss@sunwise.uwaterloo.ca == == == ==
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
"gnu-win32-request@cygnus.com" with one line of text: "help".