weixin_39822993 2020-11-30 11:25
浏览 0

Build and Runtime failures under MinGW

Originally reported on Google Code with ID 71


Ar rev.356 under MinGW, there are 2 build issues and runtime error.

a. Port.h tries to include fnmatch.h.  Windows code to workaround this exists, but
is only included under MSVC.  I changed the #if to check for _WIN32 instead of _MSC_VER.
Additionaly, added a dep to shlwapi since gcc doest have auto link.

b. For some reason, under windows with cmake 2.8.8, I had to change how the clang libraries
are linked in to IWYU because they simply weren't linked in.

c. '\' chars are not changed to '/'.  Again, this only occurs under MinGW as the code
to fix this is only included under MSVC.  Changed to #if to _WIN32.

Patch attached.

Reported by c.d.glover on 2012-06-30 16:22:05

该提问来源于开源项目:include-what-you-use/include-what-you-use

  • 写回答

9条回答 默认 最新

  • weixin_39822993 2020-11-30 11:25
    关注
    
    Thanks for patch. s/_MSC_VER/_WIN32/ looks reasonable, but if macro _WIN32 is still
    present when you build 64-bit version?
    
    There are a few changes I'd like to see in CMakeLists.txt, but there is already patch
    in issue #72 which I like more, so I won't bother you with these changes.
    

    Reported by vsapsai on 2012-07-01 23:45:28

    评论

报告相同问题?