Opened 5 years ago

Last modified 5 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@…> 5 years ago.
po_environ_dirty_fix.patch (2.7 KB) - added by abel@… 5 years ago.
quick & dirty fix for program_options

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by Jan Rosendahl <jan.rosendahl@…>

Attachment: parsers_patch_extract.cpp added

comment:1 Changed 5 years ago by Jan Rosendahl <jan.rosendahl@…>

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

Changed 5 years ago by abel@…

Attachment: po_environ_dirty_fix.patch added

quick & dirty fix for program_options

comment:2 Changed 5 years ago by abel@…

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.