#29394: in boost 1.46.1 program_options lib is unusable in macports --------------------------------------------------+------------------------- Reporter: christophe.prudhomme@… | Owner: adfernandes@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: boost1.46 program_options | Port: boost --------------------------------------------------+------------------------- Comment(by adfernandes@…): Just tried it with `g++-mp-4.5` and had no problem. Your test-case compiles and runs fine for me. I do not have the MacPorts 4.3 or 4.4 compilers on my system, so cannot test them. Are you sure you're linking the dylib for boost? I've seen problems like this (mixing gcc versions) when dylibs (or so files on LInux) are not compiled properly. Exception-handling frames and stuff like that in particular gets messed up. Alternatively, try force-linking the static boost library. Do that as follows: {{{ g++ -I /opt/local/include /opt/local/lib/libboost_program_options.a t.cpp -o t }}} and do '''not''' add any `-L` or `-l` options, otherwise the dylib will silently be used! Verify that the static lib is being used by `otool -L t` and ensure that there are no links to the boost dylib. (Both static and dynamic linking work for me, with both the system and macports 4.5 compiler.) You can also try recompiling boost and seeing if the problem goes away. Also... `gcc45` was just updated, so maybe re-install it, too... (after a `sudo port update`, of course!) Does any of this help? -- Ticket URL: <https://trac.macports.org/ticket/29394#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS