c++.command-line - Optlink and long environment variables
- Kazuhiro Inaba (22/31) Dec 05 2006 hello() { puts("Hello"); }
- Walter Bright (2/3) Dec 08 2006 I'm sorry, but not at the moment.
Optlink ignores environment variables like LIB, if there are other long env vars. Here's a reproducing example:type hello.chello() { puts("Hello"); }type world.cmain() { hello(); puts("world"); }dmc -c hello.c lib -c c:\hello.lib hello.obj set LIB=c:\ dmc world.c hello.libYes, everything is ok up to here. "C:\hello.lib" is found and linked.setA=012345678901234567890123456789012345678901234567890123456789012345 6789012345678901234567890123456789set A=%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%%A%But when there is long environment variables...dmc world.c hello.liblink world,,,hello+user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved hello.lib Warning 2: File Not Found hello.lib world.obj(world) Error 42: Symbol Undefined _hello --- errorlevel 1 The linker seems to fail reading the LIB variable. Is there a way to remedy this? I know that the linker reads "sc.ini" and LIB variable can also be set there (and it works even if there're long envvars), but i'd like to set it by environment variables if possible.
Dec 05 2006
Kazuhiro Inaba wrote:Is there a way to remedy this?I'm sorry, but not at the moment.
Dec 08 2006