.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Argh. Compiles, but linking goes wrong... Metamod related (http://forums.bots-united.com/showthread.php?t=3221)

stefanhendriks 17-12-2004 20:32

Argh. Compiles, but linking goes wrong... Metamod related
 
Hey guys,

I try to compile my own engine-independant bot framework , on HL1, using the metamod. It COMPILES fine. It has all the barebones on the interface, but then it get this:

Quote:

tm_interface_hl1.obj : error LNK2001: unresolved external symbol _GetEngineFunctions
itm_interface_hl1.obj : error LNK2001: unresolved external symbol "unsigned short __cdecl FixedUnsigned16(float,float)" (?FixedUnsigned16@@YAGMM@Z)
itm_interface_hl1.obj : error LNK2001: unresolved external symbol "short __cdecl FixedSigned16(float,float)" (?FixedSigned16@@YAFMM@Z)
Debug/ITM_HL1_BOT_CSTRIKE.dll : fatal error LNK1120: 3 unresolved externals
I had this before, but i can't recall what i have to do to make this dissapear. I have set my paths right, i can compile my metamod projects fine too. I must have forgotten something to link against obviously, but even after copying the exact line of my realbot project into this project, it gives me this stuff..

Any idea?

Cheeseh 17-12-2004 20:39

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
I think I had the same or similar problem before, it had something to do with sdk_util.h ?? I think I had to change some include lines or something.. just an idea

Lazy 17-12-2004 20:40

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
It looks like your referencing these functions but they haven't been included in the compile.
Do a search for them and make sure they are getting compiled with your project.

stefanhendriks 17-12-2004 20:42

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
yes they are in sdk_util.h cheeseh.

I will toy around with that ;)

EDIT:
Nah, even WITH including sdk_util.h , it whines about the same problem. :(

Lazy 17-12-2004 20:45

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
FixedSigned/Unsigned16 is in sdk_util.cpp, just copy it somewhere into your project :)

stefanhendriks 17-12-2004 20:48

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
yes, i copied the contents into my interface and it compiles fine and it does not bug me about the FixedSigned stuff...

But it still is not solved :(

Quote:

Creating library Release/ITM_HL1_BOT_CSTRIKE.lib and object Release/ITM_HL1_BOT_CSTRIKE.exp
itm_interface_hl1.obj : error LNK2001: unresolved external symbol _GetEngineFunctions
Release/ITM_HL1_BOT_CSTRIKE.dll : fatal error LNK1120: 1 unresolved externals
And this one, cannot be found in the metamod sdk? :(

Lazy 17-12-2004 20:50

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
Ok, you should have that in the META_FUNCTIONS gMetaFunctionTable object.
If your sure GetEngineFunctions is included make sure its spelled correctly on both ends and exported with some macro like C_DLLEXPORT or whatever the sdk provides for exporting functions.

stefanhendriks 17-12-2004 20:52

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
Nevermind, i forgot to include that source and some important functions. I can manage now. w00t. Would be nice if it would work right away.

After that, i simply spawn a bot... :)

stefanhendriks 17-12-2004 21:09

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
w00t

it compiles
it links too

Quote:

Compiling...
itm_bot.cpp
itm_bot_act.cpp
itm_bot_sense.cpp
itm_bot_think.cpp
itm_entity.cpp
itm_player.cpp
itm_shared.cpp
itm_interface_hl1.cpp
Linking...
Creating library Release/ITM_HL1_BOT_CSTRIKE.lib and object Release/ITM_HL1_BOT_CSTRIKE.exp
ITM_HL1_BOT_CSTRIKE.dll - 0 error(s), 0 warning(s)

if this is gonna work, i am gonna jump a hole in the roof.

stefanhendriks 17-12-2004 21:40

Re: Argh. Compiles, but linking goes wrong... Metamod related
 
NOOOOO

Quote:


DLL: Main entry point passed
DLL: Attaching
DLL: Main entry point passed
DLL: Detaching
DLL: Main entry point passed
DLL: Attaching
DLL: Main entry point passed
DLL: Detaching

Thats what my log says.

It simply does not load the DLL? :S It does not even do a single METAMOD function. I put logs everywhere, even in pfnGet<bla>pointer , but even that does not get logged.

Is it something that i did not link correctly? :(


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

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