开发者

Quickly determine if code is Visual C++ or not

开发者 https://www.devze.com 2022-12-22 15:48 出处:网络
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

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

精彩评论

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