Thread overview
[Issue 862] New: Can't link with std.c.stdlib.setenv
Jan 20, 2007
d-bugmail
Jan 21, 2007
d-bugmail
Jan 31, 2007
d-bugmail
January 20, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=862

           Summary: Can't link with std.c.stdlib.setenv
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: link-failure
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: deewiant@gmail.com


setenv(3) is declared in std.c.stdlib, but isn't found anywhere by the linker.

Simple test case:
--
import std.c.stdlib;

void main() {
        setenv("foo".ptr, "bar".ptr, 0);
}


-- 

January 21, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=862


thomas-dloop@kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|DMD                         |Phobos




------- Comment #1 from thomas-dloop@kuehne.cn  2007-01-21 17:40 -------
setenv is a POSIX.1-2001 not a C99 function,
however getenv is defined by C99...


-- 

January 31, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=862





------- Comment #2 from bugzilla@digitalmars.com  2007-01-31 15:09 -------
I'll add a comment that setenv/unsetenv are extensions, and not available on all platforms.


--