|
General Bot Coding See what a pain it is to get those little mechs shooting around
|
|
RealBot Author
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
|
Metamod badf error, yet.... -
17-12-2004
...
1) it compiles fine
2) it links fine
3) it is in the correct path
4) the only output i get is from the DLL Entrypoint function (DLLMain).
5) Its attaching/detaching for 3 times and then gives up
more details on: http://forums.bots-united.com/showth...?t=3221&page=2
* i made this post because the subject is not, could cause confusement.
I believe it is something in my code, probably something stupid, but i have no clue. So i have included the interface source files, perhaps someone can take a peek at it and point me to errors that could prevent loading this plugin in the first place.
|
|
|
|
|
Member
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
|
Re: Metamod badf error, yet.... -
17-12-2004
If I remember correctly, you must export GiveFnptrsToDll using a .def file.
|
|
|
|
|
RealBot Author
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
|
Re: Metamod badf error, yet.... -
17-12-2004
i created a file with the .def extention, copied the contents and made it like this:
Code:
LIBRARY ITM_HL1_BOT_CSTRIKE
EXPORTS
GiveFnptrsToDll @1
SECTIONS
.data READ WRITE
yet, i compile (rebuild all) and it still does not work. Perhaps i have to do this with MSVC or something? i have no clue how this works.
|
|
|
|
|
Member
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
|
Re: Metamod badf error, yet.... -
17-12-2004
Under your linker options you must set "Module Definition File" to your .def file.
If you create one with Visual Studio this is done automatically.
|
|
|
|
|
RealBot Author
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
|
Re: Metamod badf error, yet.... -
17-12-2004
I took a look at the linking procedure, the .def file is included there... still it does not work
EDIT:
Just saw your post, digging into Linker options. (i am using MSVC 6.0), but so far no luck finding your "Modular bla" thingy..
Last edited by stefanhendriks; 18-12-2004 at 00:01..
|
|
|
|
|
RealBot Author
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
|
Re: Metamod badf error, yet.... -
18-12-2004
I don't know why, but i tried it again with a rebuild all and it works now!
.
|
|
|
|
|
Council Member, Author of JoeBOT
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
|
Re: Metamod badf error, yet.... -
18-12-2004
sometimes it's funny what a complete rebuild might do. in JoeBOT XP I have some .cpp files, where I need to rebuild everything before the bot runs. and the strange thing is that it's .cpp files. that some compilers sometimes make errors when a .h is changed, well, you get used to it ... but .cpp files ... dunno
|
|
|
|
|
RealBot Author
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
|
Re: Metamod badf error, yet.... -
18-12-2004
rofl yeah.
Rebuild is magic But the .DEF thingy is odd, i read some sources on the internet but they all create it with NEW->TEXT file and rename it to .def. And then it 'autocompiles' with it. Well, it worked, after A FEW rebuilds... :S
anyway, it works, . And that means, my principle works. Because when i replace my interface with the empty one, it also compiles hehe.
Now, lets see if i can spawn a bot, and then i have an RACC-Like engine-independant mod. well, sorta hehe. VERY bare-boned, but working...
|
|
|
|
|
Summoner
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
|
Re: Metamod badf error, yet.... -
19-12-2004
you can look at jozef wagner's docs to see how to get rid of the .def file in MSVC...
http://forums.bots-united.com/showthread.php?t=2570
and MinGW doesn't need any .def files hehe
|
|
|
|
|
Roi de France
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
|
Re: Metamod badf error, yet.... -
19-12-2004
Yes, embedded linker directives in #pragma's are nice, however they don't allow the specification of undecorated names, that's why they have limited usefulness... For example, if this
Code:
#ifdef WIN32
#pragma comment(linker, "/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1")
#pragma comment(linker, "/SECTION:.data,RW")
#endif
works for metamod plugins, it doesn't for hook DLLs. I believe MSVC doesn't decorate GiveFnptrsToDll the same way. And that sucks a bit. Anyway, it's not a MSVC-specific problem, any C++ compiler decorates function names to resolve overload ambiguities.
RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
|
|
|
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
HTML code is Off
|
|
|
Powered by vBulletin® Version 3.8.2 Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
|
|