Compile C app with Visual Studio 2012

后端 未结 6 1447
梦谈多话
梦谈多话 2020-12-29 12:37

I plan to write application in C using Microsoft Visual Studio 2012. The problem is that I can\'t find a way to compile it right in the editor. I found this solution http:/

6条回答
  •  一个人的身影
    2020-12-29 13:15

    It is a little bit tricky to compile plain C90 and C++x0 (only partially supported) projects in VS2010 (and probably Visual Studio 11, I haven't tried native development in it yet).

    What you have to do is to create a new C++ project without precompiled header -- this is the primary requirement if you want to compile a platform-independent code (library, console application).

    There are several ways to do it. One way is to create a normal Win32 C++ console application, in the opened wizard you should go to the second page (by clicking "Next") and then uncheck the option "Include precompiled header". Then you can compile C++ (and C) projects directly in VS.

提交回复
热议问题