开发者

Quickly determine if code is Visual C++ or not

Is ther开发者_C百科e a quick way to determine whether a Visual Studio C++ project is written in plain C++ or Visual C++?


If any files include the lines #pragma once or #include "stdafx.h", it's very likely Visual C++.

(Are there any other compilers that implement #pragma once?)


No -- Visual C++ will compile most plain C++ without any problems. If you want to check for use of Windows-specific "stuff", checking for inclusion (directly or indirectly) of <windows.h> would probably be a reasonable start.


If is Visual C++ it usually has a project.sln or project.vcproj file in the project directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜