www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 862] New: Can't link with std.c.stdlib.setenv

reply d-bugmail puremagic.com writes:
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);
}


-- 
Jan 20 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=862


thomas-dloop kuehne.cn changed:

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





setenv is a POSIX.1-2001 not a C99 function,
however getenv is defined by C99...


-- 
Jan 21 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=862






I'll add a comment that setenv/unsetenv are extensions, and not available on
all platforms.


-- 
Jan 31 2007