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

Definition of dllimport function not allowed #42

Open
niko1802 opened this issue Aug 3, 2019 · 4 comments
Open

Definition of dllimport function not allowed #42

niko1802 opened this issue Aug 3, 2019 · 4 comments

Comments

@niko1802
Copy link

niko1802 commented Aug 3, 2019

whenever i try to build i get these errors

image

@Zeex
Copy link
Owner

Zeex commented Aug 6, 2019

You need to #define SUBHOOK_STATIC if you are using it as a static library or embedding in your project

@niko1802
Copy link
Author

niko1802 commented Oct 11, 2019

@Zeex i still get these errors
image

@homonovus
Copy link

bump.
SUBHOOK_STATIC is defined before include statement
i also get these errors

@Tohru-hake
Copy link

Hello all. For anyone in the future who make encounter this error I have a fairly simple solution.
As you've likely read above, and in the documentation, running subhook on windows requires you to have SUBHOOK_STATIC defined before including subhook.h. However, like the others above, even doing so would still result in this error.

The solution to this issue, is to simply add SUBHOOK_STATIC to the preprocessor definitions.
Project properties -> C/C++ -> Preprocessor -> Preprocessor Definitions

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

4 participants