clang “hello, world!” link errors in windows

前端 未结 5 2135
借酒劲吻你
借酒劲吻你 2021-02-14 03:40

I just downloaded the CLang sources, made a Visual C++ 10 IDE workspace by using CMake, and built everything from Visual C++ 10.0 (express).

Now I get a bunch of linker

5条回答
  •  孤独总比滥情好
    2021-02-14 04:23

    I think there is a misunderstanding here.

    Clang is (slowly) being taught how to parse MFC headers. As far as I know, François Pichet is about alone on this project but there are only a few errors in the whole headers lot (!), and obviously the standard library shipped with VC++ parsing has been completed a long time ago.

    However, this is about AST generation, not Code Generation. Clang is currently unable to properly generate code to interact with VC++ libraries. Not only is the name mangling incomplete, but the ABI is still being shaped (there have been numerous patches in the last 2 months to get the right padding/alignment) and there is a long standing issue with exceptions.

    If you wish to use Clang on Windows, you should use MinGW or MinGW64, see ruben's answer.

提交回复
热议问题