Re: Undefined reference error when array size is given

2015-01-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/20/15 9:07 AM, ketmar via Digitalmars-d-learn wrote: On Tue, 20 Jan 2015 07:00:31 -0500 Steven Schveighoffer via Digitalmars-d-learn wrote: https://issues.dlang.org/show_bug.cgi?id=14014 So it looks like it's a DMD bug and we should not include that module. sorry, i can't see how this

Re: Undefined reference error when array size is given

2015-01-20 Thread ketmar via Digitalmars-d-learn
On Tue, 20 Jan 2015 07:00:31 -0500 Steven Schveighoffer via Digitalmars-d-learn wrote: > On 1/19/15 4:49 PM, Steven Schveighoffer wrote: > > > I figured it out, poll.d is missing from here: > > > > https://github.com/D-Programming-Language/druntime/blob/master/mak/SRCS > > > > So it's for some r

Re: Undefined reference error when array size is given

2015-01-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/19/15 4:49 PM, Steven Schveighoffer wrote: I figured it out, poll.d is missing from here: https://github.com/D-Programming-Language/druntime/blob/master/mak/SRCS So it's for some reason not purposely included. I think there's an expectation (I'm probably guilty of this too) that if you i

Re: Undefined reference error when array size is given

2015-01-19 Thread ketmar via Digitalmars-d-learn
On Mon, 19 Jan 2015 17:05:22 -0500 Steven Schveighoffer via Digitalmars-d-learn wrote: > BTW, I've seen linker errors happen when you don't include a module, > even if there's seemingly nothing to deal with in there. To the point > where I just include all modules even if I think I can omit the

Re: Undefined reference error when array size is given

2015-01-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/19/15 4:54 PM, ketmar via Digitalmars-d-learn wrote: On Mon, 19 Jan 2015 16:49:34 -0500 Steven Schveighoffer via Digitalmars-d-learn wrote: I figured it out, poll.d is missing from here: https://github.com/D-Programming-Language/druntime/blob/master/mak/SRCS So it's for some reason not

Re: Undefined reference error when array size is given

2015-01-19 Thread ketmar via Digitalmars-d-learn
On Mon, 19 Jan 2015 16:49:34 -0500 Steven Schveighoffer via Digitalmars-d-learn wrote: > I figured it out, poll.d is missing from here: > > https://github.com/D-Programming-Language/druntime/blob/master/mak/SRCS > > So it's for some reason not purposely included. > > I think there's an expecta

Re: Undefined reference error when array size is given

2015-01-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/19/15 4:33 PM, ketmar via Digitalmars-d-learn wrote: On Mon, 19 Jan 2015 16:27:51 -0500 Steven Schveighoffer via Digitalmars-d-learn wrote: On 1/19/15 4:16 PM, ketmar via Digitalmars-d-learn wrote: On Mon, 19 Jan 2015 21:00:55 + tcak via Digitalmars-d-learn wrote: What is the reas

Re: Undefined reference error when array size is given

2015-01-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/19/15 4:27 PM, Steven Schveighoffer wrote: On 1/19/15 4:16 PM, ketmar via Digitalmars-d-learn wrote: On Mon, 19 Jan 2015 21:00:55 + tcak via Digitalmars-d-learn wrote: What is the reason of this error exactly? "core.sys.posix.poll.d" module is not compiled into druntime. as it is in

Re: Undefined reference error when array size is given

2015-01-19 Thread ketmar via Digitalmars-d-learn
On Mon, 19 Jan 2015 16:27:51 -0500 Steven Schveighoffer via Digitalmars-d-learn wrote: > On 1/19/15 4:16 PM, ketmar via Digitalmars-d-learn wrote: > > On Mon, 19 Jan 2015 21:00:55 + > > tcak via Digitalmars-d-learn wrote: > > > >> What is the reason of this error exactly? > > "core.sys.posix

Re: Undefined reference error when array size is given

2015-01-19 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/19/15 4:16 PM, ketmar via Digitalmars-d-learn wrote: On Mon, 19 Jan 2015 21:00:55 + tcak via Digitalmars-d-learn wrote: What is the reason of this error exactly? "core.sys.posix.poll.d" module is not compiled into druntime. as it is in "include" path, compiler sees it and you can use

Re: Undefined reference error when array size is given

2015-01-19 Thread ketmar via Digitalmars-d-learn
On Mon, 19 Jan 2015 21:00:55 + tcak via Digitalmars-d-learn wrote: p.s. i love new binutils! % dmd z00.d z00.o: In function `D main': z00.d:(.text._Dmain+0xa): undefined reference to `core.sys.posix.poll.pollfd.init$' z00.d:(.text._Dmain+0x10): undefined reference to `core.sys.posix.poll.p

Re: Undefined reference error when array size is given

2015-01-19 Thread ketmar via Digitalmars-d-learn
On Mon, 19 Jan 2015 21:00:55 + tcak via Digitalmars-d-learn wrote: > What is the reason of this error exactly? "core.sys.posix.poll.d" module is not compiled into druntime. as it is in "include" path, compiler sees it and you can use `pollfd` struct. but as it's not in link library, there is

Undefined reference error when array size is given

2015-01-19 Thread tcak via Digitalmars-d-learn
Code is as follows: main.d = import core.sys.posix.poll; void main(){ core.sys.posix.poll.pollfd[2] pollList; } = Error: main.d:(.text._Dmain+0x15): undefined reference to `_D4core3sys5posix4poll6pollfd6__initZ' Remove "2" and it work