bobobobo
bobobobo

Reputation: 67224

Set #include directory from C++ code file

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?

Upvotes: 0

Views: 1235

Answers (1)

Hans Passant
Hans Passant

Reputation: 941218

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.

Upvotes: 1

Related Questions