Set #include directory from C++ code file

2019-08-25 01:56发布

In MSVC++ you can always do

#pragma comment( lib, "libname.lib" )

TO link a library in from a code file, instead of fiddling with the project options dialog.

I'm looking for a way to add "Additional Include Directories" from the code file instead of using Project Settings/Configuration Properties/C,C++/General/Additional Include Directories.

Is there a way to do this?

1条回答
Emotional °昔
2楼-- · 2019-08-25 02:15

That's not possible. If you already know where the header is stored when you write the code then you should include the path in the #include directive.

查看更多
登录 后发表回答