.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > HPB_bot
HPB_bot The trusty good ole mechs by botman HLDMTFCOpposing ForceDMCFront Line Force

Reply
 
Thread Tools
can't make the hpb bot template compile
Old
  (#1)
theturtle
Guest
 
Status:
Posts: n/a
Default can't make the hpb bot template compile - 04-10-2004

hi guys !
i have a problem when compiling the HPB Bot Template #4 (using the latest cygwin version)
here is the output :

Code:
C:\projet_bot_cs\hpb_bot_template_4\HPB_bot\dlls>make

gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c bot.cpp -o b
ot.o

gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c bot_client.c
pp -o bot_client.o

gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c bot_combat.c
pp -o bot_combat.o

gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c bot_navigate
.cpp -o bot_navigate.o

gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c bot_start.cp
p -o bot_start.o
gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c dll.cpp -o d
ll.o
gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c engine.cpp -
o engine.o
gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c h_export.cpp
 -o h_export.o
gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c linkfunc.cpp
 -o linkfunc.o
gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c util.cpp -o
util.o
gcc -march=pentium -O2 -w -I../engine -I../common -I../pm_shared -c waypoint.cpp
 -o waypoint.o
dllwrap -s --output-def HPB_bot_ming.def --driver-name gcc -o HPB_bot.dll \
        bot.o bot_client.o bot_combat.o bot_navigate.o bot_start.o dll.o engine.
o h_export.o linkfunc.o util.o waypoint.o
dllwrap: no export definition file provided.
Creating one, but that may not be what you want
type GiveFnpt.dat >> HPB_bot_ming.def
dllwrap -s --def HPB_bot_ming.def --driver-name gcc -o HPB_bot.dll \
        bot.o bot_client.o bot_combat.o bot_navigate.o bot_start.o dll.o engine.
o h_export.o linkfunc.o util.o waypoint.o
HPB_bot.exp(.edata+0x87c):fake: undefined reference to `GiveFnptrsToDll__FP13eng
inefuncs_sP12globalvars_t@8'
dllwrap: gcc exited with status 1
make: *** [HPB_bot.dll] Error 1
i don't understand why it can't find the GiveFnPtrsToDll function as it is declared in h_export.o ....
could someone please help me ? i'm going crazy :'(

Last edited by theturtle; 04-10-2004 at 10:40..
  
Reply With Quote
Re: can't make the hpb bot template compile
Old
  (#2)
theturtle
Guest
 
Status:
Posts: n/a
Default Re: can't make the hpb bot template compile - 04-10-2004

excuse me but i don't manage to make carriage return in the CODE tag...
the revelant part of the error is :

dllwrap -s --def HPB_bot_ming.def --driver-name gcc -o HPB_bot.dll bot.o bot_client.o bot_combat.o bot_navigate.o bot_start.o dll.o engine.o h_export.o linkfunc.o util.o waypoint.o
HPB_bot.exp(.edata+0x87c):fake: undefined reference to `GiveFnptrsToDll__FP13enginefuncs_sP12globalvars_t @8'
dllwrap: gcc exited with status 1
  
Reply With Quote
Re: can't make the hpb bot template compile
Old
  (#3)
theturtle
Guest
 
Status:
Posts: n/a
Default Re: can't make the hpb bot template compile - 04-10-2004

It works now !

I was in fact using (didn't noticed it) mingw-gcc 3.x... downloading & installing the separate archive mingw-gcc-2.95.x solved my problems...

So, i want to suggest a few things to improve the HPB Bot template #4 :

* put a README with a warning in it, telling that people should (MUST?) use gcc-2.95.x to compile the template.
* change the makefile_mingw and put GCC=gcc-2 instead of GCC=gcc, so people will think about their gcc's version
* i had to add "#include <ctype.h>" to bot.cpp and util.cpp because this header was not included... can't understand why it compiles with your compilers... you should perhaps include these includes (hahaha) to the template to avoid peoples search where this f*$^łking function comes from
9_9

apart from these little problems, nice job for this #4 template !
  
Reply With Quote
Re: can't make the hpb bot template compile
Old
  (#4)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: can't make the hpb bot template compile - 04-10-2004

Alternately, you can probably just edit GiveFnpt.dat to contain...

GiveFnptrsToDll__FP13enginefuncs_sP12globalvars_t @8

..instead of what's currently in there.

botman
  
Reply With Quote
Re: can't make the hpb bot template compile
Old
  (#5)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: can't make the hpb bot template compile - 05-10-2004

this may be a better way:

Makefile: (for both Windows and GNU/Linux)
PHP Code:
CPP=g++
CC=gcc

#OS=linux
OS=windows

OBJ
=bot.o bot_ai.o bot_chat.o bot_client.o bot_combat.o bot_globals.o bot_navigate.o bot_sounds.o compress.o cstrike.o dllapi.o engine_api.o h_export.o linkgame.o meta_api.o namefunc.o util.o waypoint.o

CCOPT 
= -march=i586 -O6 -ffast-math -funroll-loops \
    -
fomit-frame-pointer -fexpensive-optimizations -falign-loops=\
    -
falign-jumps=-falign-functions=-fno-rtti -s

CCDEBUG 
= -ggdb3

CFLAGS 
= $(CCOPT) -I./hlsdk -I./metamod
#CFLAGS = $(CCDEBUG) -I./hlsdk -I./metamod

ifeq "$(OS)" "linux"

BASEFLAGS=-Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -w
CPPFLAGS
=${BASEFLAGS} ${CFLAGS}

podbot_i586.so:    ${OBJ}
    ${
CPP} -fPIC -shared -$@ ${OBJ} -ldl -lm

clean
:
    -
rm -*.o
    
-rm -f podbot_i586.so

else

BASEFLAGS=-w
CPPFLAGS
=${BASEFLAGS} ${CFLAGS}

PODBot.dll:    ${OBJ}
    
dllwrap -mwindows --add-stdcall-alias ${OBJ} --driver-name g++ -o PODBot.dll
    strip 
-s PODBot.dll

clean
:
    -
del *.o
    
-del podbot.dll

endif

%.
o:    %.cpp
    
${CPP} ${CPPFLAGS} -$< -$@

%.
o:    %.c
    
${CC} ${CPPFLAGS} -$< -$@ 
in h_export.cpp file:
PHP Code:
void DLLEXPORT GiveFnptrsToDllenginefuncs_tpengfuncsFromEngineglobalvars_t *pGlobals )

and in bot.h file:
PHP Code:
extern "C" EXPORT void DLLEXPORT GiveFnptrsToDll(enginefuncs_t *pengfuncsFromEngineglobalvars_t *pGlobals); 
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com