Poco
lastmod 2018-08-17created 2015-08-143 edits
Modern, powerful open source C++ class libraries for building network- and internet-based applications that run on desktop, server, mobile and embedded systems.
How to install
First, for installation instructions, read the README file.
Unneeded libraries can be omitted as follows.
You can also check with the --help option, but the configuration for MinGW can be applied as follows.
Install the libraries as follows.
Troubleshooting
Not found ssl & crypto library (from MinGW)
Even with the ./configure --omit=NetSSL_OpenSSL,Crypto option, the build reports midway through compilation that the -lssl and -lcrypto libraries cannot be found. In this case, modify the value of SYSLIBS at the end of the ./build/config/MinGW file.
Not found test (from MinGW)
During make, an error message says the file testrunner.exe.exe cannot be found. The problem is caused by the .exe extension being appended twice; in the ./build/rules/exec file, remove the $(BINEXT) value from the variables starting with EXEC_, as shown below. The result is as follows.
#
# Target names
#
EXEC_RELEASE_STATIC = $(BINPATH)/static/$(target)$(OSARCH_POSTFIX)
EXEC_DEBUG_STATIC = $(BINPATH)/static/$(target)d$(OSARCH_POSTFIX)
EXEC_RELEASE_SHARED = $(BINPATH)/$(target)$(OSARCH_POSTFIX)
EXEC_DEBUG_SHARED = $(BINPATH)/$(target)d$(OSARCH_POSTFIX)
WinMain error (from MinGW)
During make, the SampleApp project is built, and an error occurs saying there is no WinMain() function. In this case, you can find the problem by checking the ./Util/samples/SampleApp/src/SampleApp.cpp file. The problem is the POCO_APP_MAIN(SampleApp) macro at the bottom, which can be found in the ./Util/include/Poco/Util/Application.h file. A simple fix is to add WinMain() to the SampleApp.cpp file as shown below.
// ...
// POCO_APP_MAIN(SampleApp)
int main(int argc, char** argv)
{
Poco::AutoPtr<SampleApp> pApp = new SampleApp;
try
{
pApp->init(argc, argv);
}
catch (Poco::Exception& exc)
{
pApp->logger().log(exc);
return Poco::Util::Application::EXIT_CONFIG;
}
return pApp->run();
}
// For Windows Project Entry point.
#if defined(WIN32) || defined(_WIN32)
#include <windows.h>
int APIENTRY
WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdLine, int cmdShow)
{
return main(__argc, __argv);
}
#endif
See Windows Api#Undefined reference to WinMain for details.