Uwe Keller Wrote: > Hi. > I am a beginner with D and implemented a solver for SUDOKU puzzles using DMD > and Tango. > > When I try to compile the code with rebuild using the following command: > > rebuild src/evanescent/apps/sudoku/core/CommandLineInterface.d -O -release > -inline -Isrc/ -I../../deescover/src/ -ofbin/sudoku-solver -clean > > then I get the following errors by the linker that basically tell me nothing: > > /usr/lib/d/libtango-base-dmd.a(deh2.o): In function > `_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable': > (.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x9): undefined > reference to `_deh_beg' > /usr/lib/d/libtango-base-dmd.a(deh2.o): In function > `_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable': > (.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0xe): undefined > reference to `_deh_beg' > /usr/lib/d/libtango-base-dmd.a(deh2.o): In function > `_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable': > (.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x14): undefined > reference to `_deh_end' > /usr/lib/d/libtango-base-dmd.a(deh2.o): In function > `_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable': > (.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x37): undefined > reference to `_deh_end' > /usr/lib/d/libtango-base-dmd.a(dmain2.o): In function > `_D6dmain24mainUiPPaZi7runMainMFZv': > (.text._D6dmain24mainUiPPaZi7runMainMFZv+0x10): undefined reference to > `_Dmain' > collect2: ld returned 1 exit status > --- errorlevel 1 > > > > Does somebody know what the problem is (something with the Tango Lib include > seems not working) and what I can do to resolve it? > > Thanks a million in advance! > Uwe. > >
Ok, I found the problem myself. Stupid mistake that I did not see since I mostly developed in Java so far. The problem was that I put the main method in the CommandLineInterface module into a class description called CommandLineInterface. Hence the linker could not find the definition of "main" in the CommandLIneInterfaceModule. The error had nothing to do with Tango. Sorry!