From: sreuss AT asc DOT on DOT ca (Stephen Reuss) Subject: how to avoid mulitple definitions of STL free_list, start_free, end_free,heap_size 7 Dec 1997 07:29:37 -0800 Message-ID: <348ABB53.62AF.cygnus.gnu-win32@asc.on.ca> Reply-To: sreuss AT asc DOT on DOT ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com 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::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 AT sunwise DOT uwaterloo DOT 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 AT cygnus DOT com" with one line of text: "help".