Build Windows DllMain DLL with CMake
问题 I have a question similar to this one. I am trying to compile a DLL for windows similar to how Visual Studio would, except with CLion and CMake. I've tried the answer in the question, as well as the steps shown here, but I still get an error while injecting. My dll code is very simple, a similar dll compiled in visual studio works fine: #include <windows.h> #include <iostream> using namespace std; void hello() { AllocConsole(); freopen("CONOUT$", "w", stdout); cout << "Hello, World!" << endl;