MSVC - can't link Zydis to my project (unresolved external symbol __imp_ZydisFormatterInit) #187
-
I'm trying to link Zydis to my MSVC project, but I'm stuck. I downloaded the Zylib zip (3.1.0), then downloaded the linked Zycore zip and put it in the dependencies folder, and then I opened the included Zydis.sln file and was able to build perfectly (I choose Release MT). The examples all work. In my project, I've added the following to Include Directories: ... \zydis-3.1.0\msvc and to Library Directories I've added: ... \zydis-3.1.0\msvc\bin\ReleaseX64 since that is where Zycore.lib and Zydis.lib were created, both of which I've added as Additional Dependencies on the Linker->Input page. I've also included them in my sole source file as #pragma comment(lib, ...) directives. For simplicity's sake, at the moment the only thing my project does is call ZydisFormatterInit (copied that bit from Formatter01). On build I get the following error:
Verbose output from the linker shows that it is searching both Zycore.lib and Zydis.lib. Can anyone tell me what I should try next? PS I've also tried 3.0.0 and master with the same result. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Got it. Had to #define ZYDIS_STATIC_DEFINE |
Beta Was this translation helpful? Give feedback.
Got it. Had to #define ZYDIS_STATIC_DEFINE