Message-Id: <199704180452.AAA07139@hcst.net> From: "Bryan Murphy" To: Subject: Another Interesting DJGPP C++ Problem Date: Fri, 18 Apr 1997 00:47:43 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Precedence: bulk Well, here is my latest MAKE output capture. This one I find a little hard to explain also, and I even checked the FAQ this time! :) Anyways, here's the problem: I've written the basic outline of a simple event driven GUI framework for my program. It compiled fine and dandy till I tried adding in some very minimal Allegro support (i.e. I added enough Allegro routines to ideally fill the screen with one window with absolutely nothing in it and no functionality). Well, as soon as I wrote a test program, and started linking in the Allegro library, I got a ton of undefined references and a whole bunch of multiply defined refernces. Any ideas? All problems are link related. I suppose it's a coding problem, I'll be thorougly reviewing my code tomorrow, but any help would still be appreciated! gxx -g3 -fno-implicit-templates -fhandle-exceptions -I. -I../ -I./include -o ugltest ugltest.cc universe.o smath.o timer.o oolist.o input.o llist.o inilib.o ugl_bitmap.o ugl_view.o ugl_desktop.o uobject.o vertex.o vertex.o vector.o object.o ugl_window.o ugl_window.o ugl_palette.o ugl_screen.o ugl_component.o ugl_container.o -L../ -lalleg In file included from ugltest.cc:4: e:/dev/djgpp/include/stdio.h:19: warning: `EOF' redefined allegro.h:1232: warning: this is the location of the previous definition vertex.o: In function `VERTEX::VERTEX(long, long, long)': vertex.cc:4: multiple definition of `VERTEX::VERTEX(long, long, long)' vertex.o:vertex.cc:4: first defined here vertex.o: In function `VERTEX::Translate(long, long, long)': vertex.cc:11: multiple definition of `VERTEX::Translate(long, long, long)' vertex.o:vertex.cc:11: first defined here vertex.o: In function `VERTEX::SetLocation(VERTEX)': vertex.cc:18: multiple definition of `VERTEX::SetLocation(VERTEX)' vertex.o:vertex.cc:18: first defined here vertex.o: In function `VERTEX::SetLocation(long &, long &, long &)': vertex.cc:22: multiple definition of `VERTEX::SetLocation(long &, long &, long &)' vertex.o:vertex.cc:22: first defined here vertex.o: In function `VERTEX::X(void)': vertex.cc:26: multiple definition of `VERTEX::X(void)' vertex.o:vertex.cc:26: first defined here vertex.o: In function `VERTEX::Y(void)': vertex.cc:31: multiple definition of `VERTEX::Y(void)' vertex.o:vertex.cc:31: first defined here vertex.o: In function `VERTEX::Z(void)': vertex.cc:36: multiple definition of `VERTEX::Z(void)' vertex.o:vertex.cc:36: first defined here vertex.o: In function `global constructors keyed to VERTEX::VERTEX(long, long, long)': vertex.cc:38: multiple definition of `global constructors keyed to VERTEX::VERTEX(long, long, long)' vertex.o:vertex.cc:38: first defined here vertex.o: In function `__throw': vertex.cc:38: multiple definition of `VERTEX virtual table' vertex.o:vertex.cc:38: first defined here ugl_window.o: In function `UGL_WINDOW::UGL_WINDOW(int, int)': ugl_window.cc:5: multiple definition of `UGL_WINDOW::UGL_WINDOW(int, int)' ugl_window.o:ugl_window.cc:5: first defined here ugl_window.o: In function `UGL_WINDOW::~UGL_WINDOW(void)': ugl_window.cc:13: multiple definition of `UGL_WINDOW::~UGL_WINDOW(void)' ugl_window.o:ugl_window.cc:13: first defined here ugl_window.o: In function `UGL_WINDOW::Initialize(void)': ugl_window.cc:18: multiple definition of `UGL_WINDOW::Initialize(void)' ugl_window.o:ugl_window.cc:18: first defined here ugl_window.o: In function `UGL_WINDOW::Blit(UGL_BITMAP *, int, int, int, int)': ugl_window.cc:22: multiple definition of `UGL_WINDOW::Blit(UGL_BITMAP *, int, int, int, int)' ugl_window.o:ugl_window.cc:22: first defined here ugl_window.o: In function `UGL_WINDOW::OnDraw(void)': ugl_window.cc:27: multiple definition of `UGL_WINDOW::OnDraw(void)' ugl_window.o:ugl_window.cc:27: first defined here ugl_window.o: In function `UGL_WINDOW::SetBackgroundType(int)': ugl_window.cc:45: multiple definition of `UGL_WINDOW::SetBackgroundType(int) ' ugl_window.o:ugl_window.cc:45: first defined here ugl_window.o: In function `UGL_WINDOW::ShutDown(void)': ugl_window.cc:50: multiple definition of `UGL_WINDOW::ShutDown(void)' ugl_window.o:ugl_window.cc:50: first defined here ugl_window.o: In function `global constructors keyed to UGL_WINDOW::UGL_WIND OW(int, int)': ugl_window.cc:51: multiple definition of `global constructors keyed to UGL_WINDOW::UGL_WINDOW(int, int)' ugl_window.o:ugl_window.cc:51: first defined here ugl_window.o: In function `UGL_WINDOW::OnUpdate(void)': ugl_window.cc:20: multiple definition of `UGL_WINDOW::OnUpdate(void)' ugl_window.o:ugl_window.cc:20: first defined here ugl_window.o: In function `__throw': ugl_window.cc:51: multiple definition of `UGL_WINDOW virtual table' ugl_window.o:ugl_window.cc:51: first defined here ugl_desktop.o: In function `UGL_DESKTOP::UGL_DESKTOP(void)': ugl_desktop.cc:5: undefined reference to `UGL_VIEW::UGL_VIEW(int, int, int, int)' ugl_desktop.o: In function `__throw': ugl_desktop.cc:16: undefined reference to `UGL_VIEW::Translate(int, int)' ugl_desktop.cc(.text+0x248): undefined reference to `UGL_VIEW::SetOrigin(int , int)' make.exe: *** [ugltest.exe] Error 1