I need to compile poco with MinGW so I can use it in Qt Creator but cannot figure out how to, I've managed to compile poco in Visual Studio but I cannot use those libraries in Qt Creator.
With this enviroment:
This is how I configure and compile Poco for MinGW and Windows 7:
Apply the next path to avoid copysign error.(From https://github.com/pocoproject/poco/issues/57).
In the file C:\poco-1.4.6\Foundation\include\Poco\FPEnvironment_DUMMY.h
Delete the string std:: in this method:
inline float FPEnvironmentImpl::copySignImpl(float target, float source)
{
#if defined(__APPLE__) || defined(POCO_ANDROID)
return copysignf(target, source);
#else
return /*std::*/copysignf(target, source);
#endif
}
And here too:
inline double FPEnvironmentImpl::copySignImpl(double target, double source)
{
#if defined(__APPLE__) || defined(POCO_ANDROID)
return copysign(target, source);
#else
return /*std::*/copysign(target, source);
#endif
}
Modify MinGW configuration at C:\poco-1.4.6\build\config\MinGW. (From http://cidebycide.blogspot.com.es/2012/06/building-poco-c-witn-mingw.html)
You should delete the -mno-cygwin string in line:
SHLIB = $(CXX) -shared -mno-cygwin -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(basename $(notdir $@))).a
and
SYSFLAGS = -mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED -I/usr/local/include -I/usr/include
If you don't need to use cryptography and SSL, you should remove the options -lssl, and -lcrypto at SYSLIBS line.
Compile Poco without demos, SSL, cryptography and ODBC support:
$ ./configure --omit=NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQL --prefix=./_INSTALL
$ make clean
$ make -j4 -nodemos
$ make install
Good luck!