Bug 862 – Can't link with std.c.stdlib.setenv

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-01-20T15:11:00Z
Last change time
2014-02-15T13:13:25Z
Keywords
link-failure
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2007-01-20T15:11:15Z
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); }
Comment #1 by thomas-dloop — 2007-01-21T17:40:58Z
setenv is a POSIX.1-2001 not a C99 function, however getenv is defined by C99...
Comment #2 by bugzilla — 2007-01-31T15:09:55Z
I'll add a comment that setenv/unsetenv are extensions, and not available on all platforms.
Comment #3 by bugzilla — 2007-02-12T03:39:54Z
Fixed DMD 1.005