Thread overview
[Issue 459] New: Setting LIB in dmd/bin/sc.ini has no effect on linking
Oct 25, 2006
d-bugmail
Apr 18, 2008
d-bugmail
May 23, 2009
Gide Nwawudu
Jun 07, 2009
Brad Roberts
Aug 14, 2010
Don
Oct 20, 2013
Brad Anderson
October 25, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=459

           Summary: Setting LIB in dmd/bin/sc.ini has no effect on linking
           Product: D
           Version: 0.172
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: digitalmars-com@baysmith.com


Please read carefully. This sequence is different than Issue 454. 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 ---

Edit c:\dmd\bin\sc.ini to contain the following:
  LIB="%@P%\..\lib";"%@P%\..\..\dm\lib"

dmd test.d
  --- Still fails to link because phobos.lib is not found ---

Edit c:\dm\bin\sc.ini to contain the following:
  LIB="%@P%\..\lib";"%@P%\..\..\dmd\lib";"%@P%\..\mfc\lib";%LIB%

dmd test.d
  --- Now links successfully ---


-- 

April 18, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=459


gide@nwawudu.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major




------- Comment #1 from gide@nwawudu.com  2008-04-18 07:30 -------
Have a similar issue after downloading dmd-win32snapshot-0.4.0.zip from www.fsdev.net and unzipping it to my D: drive. I edited the sc.ini to switch from Tango to Phobos and I got the following error:

hello.d
-------
import std.stdio;

void main() {
        writefln("Hello World");
}

D:\test>dmd hello.d
OPTLINK (R) for Win32  Release 8.00.1
Copyright (C) Digital Mars 1989-2004  All rights reserved.
SNN.lib
 Warning 2: File Not Found SNN.lib
hello.obj(hello)
 Error 42: Symbol Undefined ......

To fix, I changed LIB line in D:\dmd-win32snapshot-0.4.0\dmd\dmd\bin\sc.ini as
follows:
  LIB="%@P%\..\lib";\dm\lib
- to -
  LIB="%@P%\..\lib;%@P%\..\..\dm\lib"

Can the sc.ini's in dmc and dmd zips be fixed?


-- 

May 23, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=459


Gide Nwawudu <gide@nwawudu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |gide@nwawudu.com




--- Comment #2 from Gide Nwawudu <gide@nwawudu.com>  2009-05-23 03:51:59 PDT ---
If DMD does not require DMC then should sc.ini be modified to the following?

  [Environment]
  LIB="%@P%\..\lib";\dm\lib
  ...
- to -
  [Environment]
  LIB="%@P%\..\lib"
  ...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 07, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=459


Brad Roberts <braddr@puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |braddr@puremagic.com




--- Comment #3 from Brad Roberts <braddr@puremagic.com>  2009-06-07 13:37:09 PDT ---
Can someone who uses windows update this bug with it's status for 1.x and 2.x? There's been changes in how dmd is packaged since this was originally filed so I suspect it might be resolved.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 14, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=459


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #4 from Don <clugdbug@yahoo.com.au> 2010-08-14 12:43:31 PDT ---
(In reply to comment #3)
> Can someone who uses windows update this bug with it's status for 1.x and 2.x? There's been changes in how dmd is packaged since this was originally filed so I suspect it might be resolved.

This has certainly not been an issue since 2.025, when dmd stopped using dmc during compilation. It might also have been fixed in 2.004, when the contents of sc.ini were changed.

Still, the change described in comment 2 has not been made in the official download; though I've discovered that my DMD development directory has that form of sc.ini, and I've used it for over a year without any problems.

I think it would be a good idea to remove the /dm/lib from
dmd/windows/bin/sc.ini
It might be responsible for some of the weird linking errors people sometimes
get -- I think they might be getting an old lib files from an old dmc
installation, if they've corrupted their dmd directory somehow.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 20, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=459


Brad Anderson <eco@gnuk.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |eco@gnuk.net
         Resolution|                            |FIXED


--- Comment #5 from Brad Anderson <eco@gnuk.net> 2013-10-19 21:10:39 PDT ---
Inclusion of dm/lib resolved by https://github.com/D-Programming-Language/dmd/pull/2684

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------