Linking error LNK2019 in MSVC, unresolved symbols with __imp__ prefix, but should be from static lib

From what I remember of my Windows days, in MinGW-built DLLs, the __imp__ symbol prefix is used for the trampoline function that calls into the DLL proper. This symbol is then provided by a small static library with the extension .dll.a. When you include libssh headers, you need to set a #define to indicate that … Read more

LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

What is your project type? If it’s a “Win32 project”, your entry point should be (w)WinMain. If it’s a “Win32 Console Project”, then it should be (w)main. The name _tmain is #defined to be either main or wmain depending on whether UNICODE is defined or not. If it’s a DLL, then DllMain. The project type … Read more