A
A
Alexander2014-10-10 19:14:48
Qt
Alexander, 2014-10-10 19:14:48

How to build POCO for QT mingw under Windows?

Hello.
I collected POCO for VS2010, everything went without problems, for this there are cmd files for each version of the studio, dll and lib files were created, everything connected and worked without problems in the studio. Now you need to connect the library to QT with the mingw compiler, and then there are problems, those library files that I collected with the studio are connected to QT, but when compiling, it gives errors like:
ICMPClient.cpp: -1: error: undefined reference to
and so for each function .
I read that the application and libraries must be compiled by one compiler. I tried to build POCO for mingw, I built it according to the instructions:
cppobserver.wordpress.com/2013/08/09/build-poco-li...
www.cyberforum.ru/blogs/136792/blog1065.html
But there were problems with each of them :
1. There are strange paths in the default config, mingw32-make swears on them that the file cannot be found, corrected them manually.
2. To compile .c files, the cc.exe compiler is required, which was not available when installing QT.
3. I downloaded separately mingw, with which I had ss.exe. But this mingw didn't want to compile the .cpp. As a result, .cpp compiled with the default QT mingw, .c files with another.
With grief in half, the library files appeared (Poco_section_mtd.a), but when connected and compiled, they give the same errors as the studio versions of the library.
POCO downloaded from off site.
Please help, maybe someone has a compiled library for mingw Windows or there is a really working instruction with which there will be no problems.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2014-10-13
Obiedkov @aobiedkov

Thank you it worked.
I decided as you wrote, connected the system libraries -liphlpapi -lws2_32 and included the parts of Poco in the correct order:
-lPoco_Net_mt -lPoco_Util_mt -lPoco_XML_mt -lPoco_Foundation_mt
Most likely, in MSVC, the missing system libraries were included in the project automatically.
So the connection looks like this:
LIBS += -L$$PWD/libs/ \
-lPoco_Net_mt -lPoco_Util_mt -lPoco_XML_mt -lPoco_Foundation_mt -liphlpapi -lws2_32

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question