.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   HPB_bot (http://forums.bots-united.com/forumdisplay.php?f=35)
-   -   Problem Compiling in Borland, and in MinGW (http://forums.bots-united.com/showthread.php?t=577)

Combat 31-01-2004 11:27

Problem Compiling in Borland, and in MinGW
 
Hi, i've coded the HPB_Bot in MSVC++ in College many times, but developement is very slow when you can only compile/test once a day. So i tried compiling on the MinGW compile ( My normal compiler ). It was not exporting GiveFnptrsToDll properly, so i changed it and got it to export properly. But now when i try loading a game in good old deathmatch, it crashes. I get no error messages, and windows doesn't know what module has the "illegal operation". So, i downloaded BCC 5.5, and compiled an unmodified HBP_Bot source, after a slight modification in linkfunc.cpp, i got it to compile rather smoothly. Only problem is, i still have the crashing problem when i try loading up deathmatch. The HL version i'm using is 1.1.0.8, NO STEAM. I know the problem is not with the HPB_Bot version of the source, because it works fine if i compile with MSVC++ or MSV.NET. Has anyone had this problem, and if so, do you know how to fix it?

Pierre-Marie Baty 02-02-2004 17:37

Re: Problem Compiling in Borland, and in MinGW
 
I assume you are using the "official" HPB_bot source (hook DLL), not the metamod plugin version. What if you tried to compile the metamod one ? they're exactly the same, as far as the bot itself is concerned...

Combat 03-02-2004 00:52

Re: Problem Compiling in Borland, and in MinGW
 
i suppose, but i am running a slow machine and using metamod causes the game to lag more. I have compiled a plugin for metamod, it doesn't seem to work either though. Metamod says the plugin is running, but i don't get any of the messages i should. And nothing seems to work properly, so i don't think the bot will either. :(

botmeister 03-02-2004 09:46

Re: Problem Compiling in Borland, and in MinGW
 
For BCC 5.5 the following works for me

Code:

#define DLLEXPORT __stdcall
#define EXPORT _declspec( dllexport )
 
extern "C" DLLEXPORT void EXPORT GiveFnptrsToDll( ...
int EXPORT GetEntityAPI( ...
int EXPORT GetNewDLLFunctions( ...

For the LINK_ENTITY_TO_FUNC macros use this

Code:

extern "C" EXPORT void mapClassName( ...

Combat 04-02-2004 00:15

Re: Problem Compiling in Borland, and in MinGW
 
hmmm... that does look a little different than mine. Thank you so much! :D

Combat 05-02-2004 03:52

Re: Problem Compiling in Borland, and in MinGW
 
actually, botmeister, turns out, that is exactly the same as mine. The problem was in the linker arguments... i was missing one. thanks for your help though! got it working now. :)


All times are GMT +2. The time now is 03:04.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.