Address is already used by function error

Using the O1 option to compile the file causes address conflicts. Switching to Ob1 allows the DLL to be protected normally, but I still want to use O1 for compilation optimization. Is there any other possible solution?
The CMake modifications are as follows:
set(CMAKE_CXX_FLAGS_RELEASE “/O1 /DNDEBUG /GL /Zi”) → set(CMAKE_CXX_FLAGS_RELEASE “/Ob1 /DNDEBUG /GL /Zi”)

By the way, the VMProtect program I am using is VMProtect Ultimate v3.9.4.

https://forum.vmpsoft.com/p/5718

P.S. You have to use code markers only when you need to protect a part of “large” function. In other cases the protection by function name from MAP/PDB is more secure:

thx a lot, this is useful :slight_smile: