Apologies for the late reply, but this could help:
As you've already seen in the other replies, the provided sc.ini file is
confounding your attempts at setting the LIB environment variable.
However, OPTLINK's search path for sc.ini includes the current
directory, so if you're reluctant to alt
My bad. DMD uses sc.ini (on windows) to set the LIB path, which will
overwrite anything already in the LIB variable once you invoke DMD.
What you can do is change sc.ini (or the equivalent .conf file on
linux), so it appends and not overwrites the LIB path.
e.g. before:
[Environment]
LIB="%@P%\..
Andrej,
Thanks for the reply. I already tried /SCANLIB before with no
success.
I couldn't find a solution so i'm sticking to the classic method of
declaring each lib in the dmd command line.
Lib paths at command line could be added to OPTLINK, it should work
in the same way the DMD -I argument wor
One more thing:
If your lib files are relative to your current working directory, then
you can just pass them to DMD. E.g. if your lib file is under the
subdir folder of your current working dir you can just use:
dmd main.d subdir\mylibfile.lib
But maybe you knew that already.
See this:
http://www.digitalmars.com/ctg/ctgLinkSwitches.html#scanlib
You pass switches to the linker via -L, so the switch might be:
dmd -L/SCANLIB
Of course you would have to update the LIB environment variable in
command line, or via a batch file before calling DMD:
> set lib=C:\DirWithLibFil
Hey!
May be a silly situation but i'm trying to append a search path for
libraries from the command line. I'm running under win32 with
DMD/OPTLINK and i use a batch file for compilation of my project.
Adding the path to sc.ini won't help because the project' sources
might be moving around in diffe