Bug 459 – Setting LIB in dmd/bin/sc.ini has no effect on linking

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2006-10-25T17:50:00Z
Last change time
2015-06-09T05:11:40Z
Keywords
link-failure, patch
Assigned to
bugzilla
Creator
digitalmars-com

Comments

Comment #0 by digitalmars-com — 2006-10-25T17:50:43Z
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 ---
Comment #1 by gide — 2008-04-18T07:30:20Z
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?
Comment #2 by gide — 2009-05-23T03:51:59Z
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" ...
Comment #3 by braddr — 2009-06-07T13:37:09Z
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.
Comment #4 by clugdbug — 2010-08-14T12:43:31Z
(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.
Comment #5 by eco — 2013-10-19T21:10:39Z