I got 'duplicate section' errors when compiling boost_regex with size optimization (-Os)

前端 未结 3 1756
情歌与酒
情歌与酒 2020-12-31 14:06

compiler: http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.2/32-bit/threads-posix/sjlj/x32-4.7.2-release-posix-sjlj-rev6.7z

boost: http://

3条回答
  •  春和景丽
    2020-12-31 14:41

    In my case boost 1.58 was internally compiling with "-march=i686", but my code wasn't. Adding "-march=i686" to my project got rid of all "duplicate section".

    lesson learned: always make painstakingly sure that all libraries and the main project are compiled with identical compiler options.

提交回复
热议问题