delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/18/12:26:05

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199704181604.AA160269476@typhoon.rose.hp.com>
Subject: Re: Another Interesting DJGPP C++ Problem
To: bf461 AT cleveland DOT freenet DOT edu (Bryan Murphy)
Date: Fri, 18 Apr 1997 9:04:36 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <199704180452.AAA07139@hcst.net>; from "Bryan Murphy" at Apr 18, 97 12:47 (midnight)

> 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  
                              ^^^^^^^^^^^^^^^^^
I don't think you want two copies of this linked in. 
 
>    ugl_window.o ugl_window.o  ugl_palette.o ugl_screen.o  ugl_component.o
     ^^^^^^^^^^^^^^^^^^^^^^^^^
Same here.  That should take care of the multiple defines.

> ugl_container.o -L../ -lalleg

This next one is not a link error, this is a Pre-processor error.
> 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

My guess is that stdio.h has a line like this (don't have the header files
here to verify)

#define EOF something

and Allegro.h has a line like this

#ifndef EOF
#define EOF somthing
#endif

If this is the case then

#include <stdio.h>
#include <allegro.h>

should work, just don't include allegro.h first. 

Andrew







- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019