Overview
Features
Download
Documentation
Community
Add-Ons & Services

building v.1.5.1 on MinGW/MSYS 4.7.2

Please post support and help requests here.

building v.1.5.1 on MinGW/MSYS 4.7.2

Postby mkaut » 09 Apr 2013, 15:10

I have managed to build v.1.5.1 on Windows 7 using MinGW 4.7.2 with the MSYS environment, so I thought I would share the list of adjustments I have made to do this.
Disclaimer: I am no developer; I have very little idea what I am doing, so use these suggestions at your own risk .. and I do welcome suggestions for improvements.

This being said, here we go:
  1. in Net/src, add the following into DNS.cpp and IpAddress.cpp:
    #define _WIN32_WINNT 0x501
    #include <ws2tcpip.h>
  2. in Data/MySQL/src, add the following into all files:
    #define _WIN32_WINNT 0x0501
    #include <winsock2.h>
  3. in Net/src/NetworkInterface.cpp, fix the two bugs from http://pocoproject.org/forum/viewtopic.php?f=12&t=5843#p10327 and add the following:
    #define _WIN32_WINNT 0x501
    #include <winsock2.h>
    #include <windef.h>
    #include <iptypes.h>
    #include <iphlpapi.h>
  4. start MSYS, go to the source folder and run:
    ./configure --no-tests --no-samples
    make -s
  5. it will fail eventually, because strip is looking for some <name>.exe.exe, instead of <name>.exe - find the <name>.exe from the log, make a copy called <name>.exe.exe, possibly strip <name>.exe and then run make -s again.
  6. repeat the above until it builds everything.
  7. run make install to get the files into <MSYS-root>/local
  8. in file <MSYS-root>/local/include/FPEnvironment.h, change
    [i]#include "Poco/FPEnvironment_WIN32.h"

    on line 55 (after #elif defined(POCO_OS_FAMILY_WINDOWS)) into
    #include "Poco/FPEnvironment_DUMMY.h"
    I am not sure whether this can do some harm, but neither FPEnvironment_WIN32.h nor FPEnvironment_C99.h

With this setup, I managed to build and install Poco and and build my own code that uses the MySQL interface.
However, I did not manage to build the whole test suite: when I try to do this, the first couple of test suites builds OK (except for the .exe.exe issue), but the Net test suite fails with "undefined reference to `Poco::Error::getMessage(unsigned long)' from NetworkInterface.cpp" ...

Good luck
Michal
mkaut
 
Posts: 19
Joined: 17 Oct 2012, 15:22

Re: building v.1.5.1 on MinGW/MSYS 4.7.2

Postby alex » 10 Apr 2013, 03:21

Error::getMessage() was added in develop for 1.5.2.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States



Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron