Page 1 of 1

Address is already used by function error

Posted: Wed Apr 30, 2025 2:12 am
by vang-z@foxmail.com
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")

Re: Address is already used by function error

Posted: Wed Apr 30, 2025 2:18 am
by vang-z@foxmail.com
By the way, the VMProtect program I am using is VMProtect Ultimate v3.9.4.

Re: Address is already used by function error

Posted: Wed Apr 30, 2025 3:20 am
by Admin
viewtopic.php?p=37678

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:
https://vmpsoft.com/vmprotect/user-manu ... -a-project

Re: Address is already used by function error

Posted: Wed Apr 30, 2025 4:25 am
by vang-z@foxmail.com
thx a lot, this is useful :)