Overview
Features
Download
Documentation
Community
Add-Ons & Services

support for minGW

Discussion of ideas for features and new projects based on POCO.

support for minGW

Postby marlowa » 13 Aug 2006, 16:11

When I create a configuration for minGW and try a POCO build, here is a sample of what happens:-

make -C CppUnit
make[1]: Entering directory `/andrew/tools/poco-1.1.2/CppUnit'
** Compiling src/CppUnitException.cpp (debug, shared)
g++ -Iinclude -Ic:/everything/andrew/tools/poco-1.1.2/Foundation/include -Ic:/everything/andrew/tools/poco-1.1.2/XML/include -Ic:/everything/andrew/tools/poco-1.1.2/Util/include -Ic:/everything/andrew/tools/poco-1.1.2/Net/include -Ic:/everything/andrew/tools/poco-1.1.2/CppUnit/include -DPOCO_BUILD_HOST=VOYAGER -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -g -D_DEBUG -DPOCO_DLL -c src/CppUnitException.cpp -o c:/everything/andrew/tools/poco-1.1.2/CppUnit/obj/MINGW32_NT-5.0/i686/debug_shared/CppUnitException.o
src/CppUnitException.cpp:14: error: definition of static data member 'CppUnit::CppUnitException::CPPUNIT_UNKNOWNFILENAME' of dllimport'd class

src/CppUnitException.cpp:14: warning: 'CppUnit::CppUnitException::CPPUNIT_UNKNOWNFILENAME' defined locally after being referenced with dllimport linkage

src/CppUnitException.cpp:15: error: definition of static data member 'CppUnit::CppUnitException::CPPUNIT_UNKNOWNLINENUMBER' of dllimport'd class

src/CppUnitException.cpp:15: warning: 'CppUnit::CppUnitException::CPPUNIT_UNKNOWNLINENUMBER' defined locally after being referenced with dllimport linkage

make[1]: *** [c:/everything/andrew/tools/poco-1.1.2/CppUnit/obj/MINGW32_NT-5.0/i686/debug_shared/CppUnitException.o] Error 1

Any chance of better support for minGW? Whilst cygwin is very useful IMO minGW is better in some ways since it results in native DOS/Windoze executables (Cygwin requires the cygwin dll).

-Andrew Marlow

marlowa
 
Posts: 36
Joined: 19 Jul 2006, 09:02
Location: United_Kingdom

Re: support for minGW

Postby MaikBeckmann » 15 Aug 2006, 00:39

This would be very helpful! To be true, the missing mingw support is the only reason why I hesitate to use poco more extensively. At work (I'm a student helper) mingw is the only way to get a recent c++ compiler.

regards, Maik
MaikBeckmann
 
Posts: 2
Joined: 27 Jul 2006, 18:03
Location: Germany

Re: support for minGW

Postby peter » 16 Aug 2006, 13:58

Hi Andrew,
version 1.2 will contain support for Cygwin (which I believe, allows you to compile for MingW).
If you don't want to wait so long, you can try to modify the
default project header files, e.g. Foundation.h:
Change from
#if defined(_WIN32) && defined(POCO_DLL)
#if defined(Foundation_EXPORTS)
#define Foundation_API __declspec(dllexport)
#else
#define Foundation_API __declspec(dllimport)
#endif
#endif

to

#if (defined(_WIN32) || defined(_MINGW)) && defined(POCO_DLL)
....

and add to your configuration file
a -D_MINGW

Then the dlls should link (not tested though)..
Regards,
Peter
peter
 
Posts: 67
Joined: 11 Jul 2006, 16:26
Location: Austria

Re: Re: support for minGW

Postby petrux » 21 Sep 2007, 15:40

> Hi Andrew,
> version 1.2 will contain support for Cygwin (which I believe, allows you to compile for MingW).

Hi there!

we're at version 1.3.and_over ;-) what about this support? I could not build poco using MinGW. Do you have any other suggestion?

Thanks in advance,
petrux

--
petrux
 
Posts: 17
Joined: 07 Sep 2007, 15:30


Return to Wishlist

Who is online

Users browsing this forum: No registered users and 0 guests