Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: undefined reference to 'SandInlineHook' #87

Open
Arc157 opened this issue Jul 4, 2021 · 0 comments
Open

error: undefined reference to 'SandInlineHook' #87

Arc157 opened this issue Jul 4, 2021 · 0 comments

Comments

@Arc157
Copy link

Arc157 commented Jul 4, 2021

Hello, im getting this error error: undefined reference to 'SandInlineHook' everytime i declare SandInlineHook like this in my c++ main file. SandInlineHook((void*)WeaponSounds, (void*)old_WeaponSounds);. These are my variables

bool WeaponSoundsHookInitialized = false;
bool isShotgun;

And this is the function that i wanna hook

void(*old_WeaponSounds)(void *instance);
void WeaponSounds(void *instance) {
    if(instance != NULL) {
        if(!WeaponSoundsHookInitialized){
            WeaponSoundsHookInitialized = true;
        }
        if (isShotgun) {
            *(bool *) ((uint64_t) instance + 0x3A8) = true;
        }
    }
    old_WeaponSounds(instance);
}

I have no idea what could be causing this error. I'm using the nativehook library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant