开发者

Include file into entire project

开发者 https://www.devze.com 2023-02-21 17:40 出处:网络
is there any way to include one file into entire project? I want to have some globals and macros accessible开发者_运维问答 from any file in project, but i do not really write #include in every file

is there any way to include one file into entire project? I want to have some globals and macros accessible开发者_运维问答 from any file in project, but i do not really write #include in every file TY


Use Visual Studio project settings:

Projekt Properties->Configuration Properties->C/C++->Advanced->Forced Include Files

This will use the specified include files in every source file.

MSDN Forced include


Alternativ:

If you use precompiled headers you could also add your globals/macros to the stdafx.h

0

精彩评论

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