TsudaKageyu / minhook

The Minimalistic x86/x64 API Hooking Library for Windows
http://www.codeproject.com/KB/winsdk/LibMinHook.aspx
Other
4.32k stars 886 forks source link

Building a dll with the /GL optimization flag and the clang compiler #129

Closed b0ryakha closed 3 months ago

b0ryakha commented 3 months ago

The biggest problem is that when building a Release project, cmake-tools automatically sets the /GL flag. But when trying to build a dll with MinHook, it cannot compile with this flag, is this a library problem or is it in my configuration?

Full error: [build] lld-link: error: x64\Release\libMinHook\hook.obj: is not a native COFF file. Recompile without /GL?

Building for x64, include Release/libMinHook.x64.lib, all headers and sources included. Minhook was built in visual studio 2022, .lib took it from minhook/lib/Release/

Is it possible to add support for the /GL flag for the minhook library?

b0ryakha commented 3 months ago

The problem was in my MinHook build, as a result I built the MinHook in Visual Studio with the /GL flag disabled, and this fixed the error.