Opened 9 years ago

Last modified 9 years ago

#9428 new Patches

Lib program_options build fail for mingw

Reported by: Jan Rosendahl <jan.rosendahl@…> Owned by:
Milestone: To Be Determined Component: Building Boost
Version: Boost 1.55.0 Severity: Problem
Keywords: Build MinGw Cc:

Description

Library program_options (boost 1.55, same applies to earlier boost versions) does not build for mingw (4.6.2). Don't know if MinGW is fully supported by boost, but some libraries do seem to have adaptation for it. Solution seems straight-forward. File ...\libs\program_options\src\parsers.cpp:

#if !defined(_WIN32)
defined(COMO_VERSION)

extern char environ; #else SMAL patch for MinGW #if defined(_WIN32) && defined(MINGW32) extern char environ; #endif

(SMAL is a soon-to-be released open-source sw)

Attachments (2)

parsers_patch_extract.cpp (727 bytes ) - added by Jan Rosendahl <jan.rosendahl@…> 9 years ago.
po_environ_dirty_fix.patch (2.7 KB ) - added by abel@… 9 years ago.
quick & dirty fix for program_options

Download all attachments as: .zip

Change History (4)

by Jan Rosendahl <jan.rosendahl@…>, 9 years ago

Attachment: parsers_patch_extract.cpp added

comment:1 by Jan Rosendahl <jan.rosendahl@…>, 9 years ago

The proposed change does not work for building shared libraries, don't know if there is a way to solve that as well.

by abel@…, 9 years ago

Attachment: po_environ_dirty_fix.patch added

quick & dirty fix for program_options

comment:2 by abel@…, 9 years ago

I ran into the same problem when trying to compile for c++0x, so I fixed this quick and dirty. However, did not have time to test as other libraries would not compile either and I had to move on. I though I'd share it anyway.

Note: See TracTickets for help on using tickets.