Can I mix C++ and C in a single project in Visual Studio?

前端 未结 2 1690
南旧
南旧 2021-02-13 00:38

I have a a Win32 DLL project in VS2008, it is written in a handful of C modules.
Because I also want to be able to build outside VS2008, with no dependency on VS200

2条回答
  •  日久生厌
    2021-02-13 01:21

    First of all, you shouldn't even need /Tc if you're building it yourself - cl.exe uses file extension to determine the type, so .c files will be compiled as C by default, and .cpp and .cxx files as C++.

    For VS projects, it works in exact same way, except that you can't override this behavior (or at least I do not know how).

提交回复
热议问题