View Single Post
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 01-14-2011 , 14:29   Re: undefined symbol from my own plugin
Reply With Quote #11

So ::Load is fixed? I assume yes.

We don't have info about the CSSPlayer_SwitchTeam function, so a general note:

If it is your own function, try the following:

1) Verify that the function is being compiled:
Place an invalid line of code inside the function's body like blablablablabla error error; or int errorarray[-100];
1.1) Error gets triggered: Remove the error line again. Then, make sure the object file resulting from the compilation gets linked.
The easiest way to do that would be to examine the output when you do a make command (maybe buffer it with a make | less command line) for readability.
The gcc invokation which produces the output .so file should contain the examined .o file as one of its inputs.

1.2) Error does not appear: Find out why the function is not being compiled.
Possibility A: File is not being compiled at all: It does not appear in make's output when changed (for example with a touch file command line).
Possibility B: The function is not being compiled. Make sure it is not hidden by #ifdefs.

There are of course many other possibilities but these are the main ones.
What also happens often in C is that the function definition is misspelled. But the probability of that is very low because the C++ compiler should find out if the defined function is not a class member.

Also note that there is a command for examining the not-yet-resolved-exports without you having to launch srcds or something.
I think it was ldd and I don't remember the command line parameters, feel free to explore.
__________________
hello, i am pm
PM is offline