subhook icon indicating copy to clipboard operation
subhook copied to clipboard

Definition of dllimport function not allowed

Open niko1802 opened this issue 6 years ago • 4 comments

whenever i try to build i get these errors

image

niko1802 avatar Aug 03 '19 22:08 niko1802

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

Zeex avatar Aug 06 '19 15:08 Zeex

@Zeex i still get these errors image

niko1802 avatar Oct 11 '19 08:10 niko1802

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

homonovus avatar Feb 02 '21 06:02 homonovus

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

Tohru-hake avatar Feb 13 '23 18:02 Tohru-hake