This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

undefined reference etc..

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.move.o
act.obj1.o act.obj2.o act.other.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
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 );
                   extern struct room_data        *room_db[WORLD_SIZE];
                   return( ( lVNum < WORLD_SIZE && lVNum > -1 ) ? room_db[
lVNum ] : 0 );
             "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?

Gianluca (Italy)

Gianluca Colucci
Programmatore e Consulente Informatico
Tel. 0347-7767029

Want to unsubscribe from this list?
Send a message to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]