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.
精彩评论