"undefined reference to" error. can't compile with custom modules

Andrey andr-sar at yandex.ru
Sun Sep 16 07:11:24 PDT 2012


DMD version 2.60 (Linux, 32/64 bit). Ubuntu 12.04, Linux 
3.2.0-30-generic

File "datastructures.d":

module datastructures;

import std.container;
import std.stdio;

struct MyStruct(T) {
T* element;
}

File "tests.d":

import datastructures;

void main() {
	int i = 0;
}

I get this message in console when try to compile both with DMD 
and GDC:

tests.o:(.data+0xc): undefined reference to 
`_D14datastructures12__ModuleInfoZ'
collect2: выполнение ld завершилось с 
кодом возврата 1
--- errorlevel 1


More information about the Digitalmars-d-bugs mailing list