Additional path for libs

Heinz malagana15 at yahoo.com
Wed Feb 23 19:48:28 PST 2011


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 different machines and folders so i'm
trying to set a path relative to the sources when invoking dmd.
Copying sc.ini to the source path won't help much because DMD might
be in different locations at other machines and also the idea is
not to mess with the config file.
Setting the LIB enviroment variable doesn't produce a positive
result.
Here's my batch file:

---------------------------------------------------
@ echo on
set LIB=..\lib
dmd -O -release -inline -ofdemo.exe -I..\import main.d main.def
pause
---------------------------------------------------

The libs are called from sources with pragma(lib, "mylib.lib");
Any tips on how to accomplish this, if possible?

BIG THANKS


More information about the Digitalmars-d-learn mailing list