delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/03/15:44:46

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199907031844.UAA17482@bi266.unive.it>
X-Sender: raistlin AT steam DOT italian DOT it
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0
Date: Sat, 03 Jul 1999 21:44:46 +0200
To: cygwin AT sourceware DOT cygnus DOT com
From: Gianluca <raistlin AT steam DOT italian DOT it>
Subject: undefined reference etc..
Mime-Version: 1.0

Hi everybody.
  I'm a new member of this mailing list and I need your help :)

I'm trying to port a game from Linux to Win32. The game is managed by a
server and I ought to compile it. I get no big errors in the compiling
moment but I've many problems in the linking.

I bring here a piece of the make log:

g++ -ggdb3 -pg -g -o tfserver comm.o act.comm.o act.info.o act.move.o
act.obj1.o act.obj2.o act.off.o act.other.o act.social.o act.wizard.o
handler.o db.o interpreter.o utility.o spec_assign.o shop.o limits.o
mobact.o fight.o modify.o weather.o spells1.o spells2.o spell_parser.o
reception.o constants.o spec_procs.o signals.o board.o magic.o magic2.o
skills.o opinion.o trap.o magicutils.o multiclass.o hash.o sound.o heap.o
spec_procs2.o magic3.o security.o spec_procs3.o create.o bsd.o parser.o
ansi_parser.o mail.o mindskills1.o mind_use1.o create.mob.o create.obj.o
gilde.o charlist.o breath.o speciali.o spec_poly.o

act.comm.o: In function `real_roomp(long)':
/TF/act.comm.c(.text$real_roomp__Fl+0x0): multiple definition of
`real_roomp(long)'
comm.o(.text$real_roomp__Fl+0x0):/TF/fight.h: first defined here

      I checked and I saw that the function is called inside act.comm.c
more times with these    	   lines:
                  
                  [...]
                 if( real_roomp( ch->in_room )->zone == 
              real_roomp( i->character->in_room )->zone ||
              GetMaxLevel( i->character ) >= LOW_IMMORTAL ||
              GetMaxLevel( ch ) >= LOW_IMMORTAL )
                   [...]

                 [...]
                if( real_roomp(ch->in_room)->zone != 
                   real_roomp(vict->in_room)->zone && 
                   GetMaxLevel(ch) < LOW_IMMORTAL )
                 [...]

                 [...] 
                 rp = real_roomp(ch->in_room);
                 [...]

                 [...]
                 for( gch = real_roomp(ch->in_room)->people;
                 gch != NULL; gch = gch->next_in_room )
                 [...]
           
             and so on...
            then I checked how the function is declared and I find it in a
header file (utils.h)
            included in protos.h, the "global header file", included in
every file...

            in protos.h, utils.h is so called:

                 #include "utils.h"

           and in utils.h, the function real_roomp is so built:

                   inline struct room_data *real_roomp( long lVNum )
                   {
                   #if HASH
                   extern struct hash_header      room_db;
                   return hash_find( &room_db, lVNum );
                   #else
                   extern struct room_data        *room_db[WORLD_SIZE];
                   return( ( lVNum < WORLD_SIZE && lVNum > -1 ) ? room_db[
lVNum ] : 0 );
                   #endif
                   }
               
             "HASH" is not enabled, so the first line are useless, and the
real body is built by
              the second rows.
              
              The compiler said the first declaration is in fight.h but
there I can't find no
              "real_roomp" strings.

  
Has anyone understood anything? pls help me :)

P.S.: The linker warn me that there isn't the crypt function, used inside
the program. Which is the header file for that function?

Thx 
Gianluca (Italy)

Gianluca Colucci
Programmatore e Consulente Informatico
Tel. 0347-7767029

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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