[Issue 454] New: Setting LIB environment variable has no effect on Windows

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 24 14:53:16 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=454

           Summary: Setting LIB environment variable has no effect on
                    Windows
           Product: D
           Version: 0.172
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: digitalmars-com at baysmith.com


To reproduce problem:

Extract dmc.zip to C:\
Extract dmd.172.zip to C:\
Change directory to an alternate drive, for example "cd d:"
Create file test.d with the following contents:
  import std.stdio;
  void main() {
    writefln("test");
  }

set PATH=c:\dm\bin;c:\dmd\bin;%PATH%
dmd test.d
  --- Fails to link because phobos.lib is not found ---
set LIB=c:\dm\lib;c:\dmd\lib
dmd test.d
  --- Still fails to link because phobos.lib is not found ---
Add "%@P%\..\..\dmd\lib" to LIB in c:\dm\sc.ini for example:
  LIB="%@P"\..\lib";"%@P%\..\..\dmd\lib";"%@P%\..\mfc\lib";%LIB%
dmd test.d
  --- Now links successfully ---

This problem also leads me to believe that the dmd\bin\sc.ini may also not be
working because it was set to the following:
  LIB="%@P%\..\lib";\dm\lib
Although this is in the location of the dmd compiler, it should have been
passed through to the linker like the LIB environment variable

Personally, I think dmd\bin\sc.ini should default to this:
  LIB="%@P%\..\lib";"%@P%\..\..\dm\lib";%LIB%
The setting \dm\lib will not work if the linker is on a different drive from
where the compile command is executed. I think it is more likely that the dm
and dmd directories will be in the same relative location.


-- 




More information about the Digitalmars-d-bugs mailing list