Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting compiler and linker directories via pragma in Visual C++

Is it possible in Visual C++ to set additional include directories and additional libary directories in the source code itself, through pragma definitions (similarly to #pragma comment(lib, "xxx.lib") to link specific libs)?

like image 550
martjno Avatar asked Oct 29 '25 06:10

martjno


2 Answers

The latest list of available pragmas for Visual C++ is available here. I don't see anything there for specifying library paths or anything else like that.

like image 138
T.E.D. Avatar answered Nov 01 '25 08:11

T.E.D.


There is no way to do this. This is the list of all supported pragma directives.

like image 40
Nikola Smiljanić Avatar answered Nov 01 '25 06:11

Nikola Smiljanić



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!