Object file has too many sections

前端 未结 4 1101
滥情空心
滥情空心 2020-12-01 07:28

We am making heavy use of boost::serialization and templates in general. All seems to be going well.

Except, we\'ve hit a snag on our Windows builds. It seems to cau

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-01 08:17

    I faced the same problem when I compiled Poco library with MinGW-w64, it turned out that debug object was huge for one implementation file.

    As you mentioned before you can split up cpp files and it will work, but when you face with someone's source code you can't do that without breaking something.

    As a solution you can turn on compiler optimisations: start with -O1 up to -O3, with each step it will build smaller object file, it may solve the problem, it did in my case. Yes, for debug builds it may be undesirable, you can try -Og as well

提交回复
热议问题