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

2012-09-16 Thread Andrey
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

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

2012-09-16 Thread Adam D. Ruppe
I think this is the wrong newsgroup. Normally you'd use digitalmars.D.learn. But when compiling you should put all your custom modules on the command line. dmd tests.d datastructures.d And that will solve it. Alternatively you can compile them separately then put all the .o files together

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

2012-09-16 Thread Andrey
On Sunday, 16 September 2012 at 14:13:02 UTC, Adam D. Well, sometimes it works and sometimes doesn't. For example, if I exclude std.stdio import from the module file, then it works just with dmd tests.d. Although yersterday it worked fine even with imported stdio. It this undefined behavior?

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

2012-09-16 Thread Adam D. Ruppe
On Sunday, 16 September 2012 at 14:28:40 UTC, Andrey wrote: Well, sometimes it works and sometimes doesn't. For example, if I exclude std.stdio import from the module file, then it works just with dmd tests.d. Although yersterday it worked fine even with imported stdio. It this undefined

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

2012-09-16 Thread Andrey
Thank you for clearance. ^_^ I hope this will find its way somewhere to official docs. I suppose, this topic is closed then if there is nothing more to add.