digitalmars.D.learn - import from the same dir
- Alexandr (28/28) Nov 26 2007 hello to all!
- Daniel Keep (5/8) Nov 26 2007 You need to use:
- bearophile (4/12) Nov 26 2007 It's a silly limitation of DMD I hope to see solved soon. In the meantim...
hello to all!
i have:
======systemsolver.d====
module systemsolver;
import std.stdio;
class SystemSolver
{
  this()
  {
    writefln("Constr!");
  }
}
===main.d==
import std.stdio;
import systemsolver;
void main(char[][] args)
{
  writefln("Hello World, Reloaded");
}
=====
these 2 files are in the same dir. When i try to compile main.d i get error:
user LMZ:/Coding$ dmd main.d 
gcc main.o -o main -m32 -Xlinker -L/home/user/dmd/bin/../lib -lphobos -lpthread
-lm 
main.o:(.data+0x38): undefined reference to `_D12systemsolver12__ModuleInfoZ'
collect2: ld returned 1 exit status
--- errorlevel 1
======
help me please!
 Nov 26 2007
Alexandr wrote:... these 2 files are in the same dir. When i try to compile main.d i get error: user LMZ:/Coding$ dmd main.dYou need to use: $ dmd main systemsolver DMD will only compile the files you *tell* it to compile. -- Daniel
 Nov 26 2007
Alexandr Wrote:these 2 files are in the same dir. When i try to compile main.d i get error: user LMZ:/Coding$ dmd main.d gcc main.o -o main -m32 -Xlinker -L/home/user/dmd/bin/../lib -lphobos -lpthread -lm main.o:(.data+0x38): undefined reference to `_D12systemsolver12__ModuleInfoZ' collect2: ld returned 1 exit status --- errorlevel 1 ====== help me please!It's a silly limitation of DMD I hope to see solved soon. In the meantime this limitation can be written in the FAQ to warn newbies, and there are a couple of tools (I use one called "bud") that can solve that problem. Bye, bearophile
 Nov 26 2007








 
  
  
 
 Daniel Keep <daniel.keep.lists gmail.com>
 Daniel Keep <daniel.keep.lists gmail.com> 