Closed MVoz closed 5 years ago
It is weird, I cannot reproduce your problem. I also use Visual Studio 2017 x64. I tried to compile it in a Debug configuration and had no issues.
Also on AppVeyor it compiles cleanly and passes all the tests, so I don't think my CMake file is wrong.
Please make sure that this problem is not caused by some misconfiguration on your side.
And as a temporary workaround, to make the library work, you can just disable building tests (this exe with delayload imports is just a part of the test cases, not of the libpeconv itself). Tests can be disabled just by unmarking the option PECONV_BUILD_TESTING
:
CMAKE_GENERATOR Ninja
I wanted to make a port of this library https://github.com/microsoft/vcpkg
Oops ... accidentally closed))
Please check if this update helped you. I cannot really check because for me it worked before too.
Apparently you need to add to each test and maybe I'm mistaken with the parameters of cmake
But this is the only exe in the project that uses delayload imports...
ok, I'll get to the working machine, check
\google translate ))
ok, let me know...
ok
tests\tests.exe
TESTS DEPLOYED!
Supply the test id!
install block in CMakeLists.txt?
install(TARGETS ${targets}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
Ok, this is little things
@Voskrese - I am glad that it worked now. I can add those install blocks too, it is not a problem. But please make a separate issue for this, because it is a different topic than those linking problems.
msvc ver 2017 x64 dynamic \\ DEBUG
user32.lib(USER32.dll) : error LNK2001: unresolved external symbol __delayLoadHelper2
https://docs.microsoft.com/ru-ru/cpp/build/reference/specifying-dlls-to-delay-load?view=vs-2019
cl t.cpp user32.lib delayimp.lib /link /DELAYLOAD:user32.dll
add
std libdelayimp
.lib ?