Linking msys2 Poco for Mingw-w64 forces wmain as an entry point #3775
Replies: 3 comments
-
There is no wWinMain in Poco::NetSSL_OpenSSL. This is an issue for the packager, not us. |
Beta Was this translation helpful? Give feedback.
-
@aleks-f I think it is not that simple. The case is,
Basically, there may be a case, when Poco header, which is |
Beta Was this translation helpful? Give feedback.
-
Which cross-platform header exactly is including windows headers? From what I'm reading above, the header is named Platform_WIN32.h and that is a platform-specific header, only included on Windows: poco/Foundation/include/Poco/Foundation.h Lines 99 to 100 in 2b11cb5 Poco is a collection of cross-platform libraries using native OS headers and API directly, while mingw is pretending to be a gcc environment on windows platform; from that difference, the problems like this originate. I have no problem with people trying to make Poco compile with mingw. But think about what you're doing - essentially pretending to be POSIX environment on Windows to a framework that actually knows how to use Windows API directly. We do not officially support mingw because (1) so far we had no need for it and (2) we do not have a dedicated maintainer for it. We support windows in a different way, and whoever wants mingw to be properly supported can step up and take the ownership of that aspect. |
Beta Was this translation helpful? Give feedback.
-
https://packages.msys2.org/package/mingw-w64-x86_64-poco version 1.10.1-8
Simple program basically without any code will not link with
main
as an entry point:CMakeLists.txt
send_smtp.cpp
SO: https://stackoverflow.com/questions/73477614/undefined-reference-to-wwinmain-when-linking-poconetssl
Apparently
Poco::NetSSL
links an object/static lib that definesextern wWinMain
. This is definetelly a bug.Linking libraries does not have to impose any requirements on the app's entry point.
Beta Was this translation helpful? Give feedback.
All reactions