"fade" <do****************@mail.comwrote in message
news:Xn********************@194.65.14.158...
>
Good afternoon
Is there a way to tell the compiler and linker where to look for my
header files and libraries directly on the code?
(I'm not talking about changing
project properties, linker, additional lib dirs... )
I can tell what libs I want to use, with this:
eg.
#define MATLAB_LIB_1 "C:\\Program Files\\MATLAB71\\extern\\lib\\win32
\\microsoft\\msvc70\\libeng.lib"
#pragma comment(lib, MATLAB_LIB_1)
As you see I'm telling the full pathname for libeng.lib
How do I tell the linker where to look for libs?
And how do I tell the compiler where to look for headers?
You use the command line options and/or project settings.
Other than the use of #pragma comment that you've already discovered, there
are no other mechanisms that I'm aware of to pass absolute paths to the
linker/compiler from within the source code itself. That's a very unusual
thing to want to do that goes against most guidelines for sensible
development (imagine moving your code to another machine), so I don't expect
you're going to find exactly what you're looking for.
-cd