Opened 4 years ago

Last modified 4 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:


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)

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

Download all attachments as: .zip

Change History (4)

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

Attachment: parsers_patch_extract.cpp added

comment:1 Changed 4 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 4 years ago by abel@…

Attachment: po_environ_dirty_fix.patch added

quick & dirty fix for program_options

comment:2 Changed 4 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.

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.