Compile Poco with MinGW on Windows

mingw, poco-libraries, qt

Solution

Complementing Cesar's answer (here, instead of adding a comment, for formatting purposes), you need something like this on your .pro file:

INCLUDEPATH += "<path_to_poco_include_dir>"
LIBS += -L"<path_to_poco_lib_dir>" -l<poco_lib> -l<poco_lib>

E.g., in my case, I would have this (for debug builds):

INCLUDEPATH += "C:/Dev/lib/poco/poco143/Debug/include"
LIBS += -L"C:/Dev/lib/poco/poco143/lib" -lPocoFoundationd -lPocoUtild

You can then refine this a bit, by creating settings for both debug and release builds:

LIB_HOME = "C:/Dev/lib/"
POCO_HOME = $${LIB_HOME}poco/poco143/

# SEE http://www.qtcentre.org/threads/23655-Does-Qt-Creator-understand-debug-release-scopes-in-pro-files
# OR http://www.qtcentre.org/threads/30430-How-to-set-pro-file-about-debug-and-release
####
CONFIG(debug, debug|release) {
CONFIG -= debug release
CONFIG += debug
}

CONFIG(release, debug|release) {
CONFIG -= debug release
CONFIG += release
}
####

debug {
POCO_DEBUG = d
POCO_PATH = $${POCO_HOME}Debug
}

release {
POCO_DEBUG =
POCO_PATH = $${POCO_HOME}Release
}

INCLUDEPATH += "$${POCO_PATH}/include"
LIBS += -L"$${POCO_PATH}/lib" -lPocoFoundation$${POCO_DEBUG} -lPocoUtil$${POCO_DEBUG}

Hope this helps.

Problem

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.

Original source