Linking Errors

Phr00t phr00t at
Tue Jun 17 18:41:28 PDT 2008

Hey all,

I posted this problem to, but I'm not sure how many faces see that

This problem is driving me nuts.. does anyone have any suggestions?

I get no code warnings / errors in the following code during compilation. I
can have FU_ITEM and FU_SHIP objects, and I can have dlinkedlists of FU_SHIPs,
but not of FU_ITEMs as they create linking errors.

Take the following test code:

---------------------------- test.d -----------------
module test;

private import arc.templates.dlinkedlist;

private import classes.item;
private import classes.ship;

void main() {

   FU_ITEM OKItem = new FU_ITEM();
   FU_SHIP OKShip = new FU_SHIP();

   dlinkedlist!(FU_ITEM) failItemList = new dlinkedlist!(FU_ITEM);
   dlinkedlist!(FU_SHIP) OKShipList = new dlinkedlist!(FU_SHIP);


It gives these errors on linking:

./_test.o: In function `_Dmain':
test.d:(.text._Dmain+0x25): undefined reference to
test.d:(.text._Dmain+0x30): undefined reference to

I am using:
* Ubuntu 8.04
* dmd v1.0.30
* GNU ld (GNU Binutils for Ubuntu)
* ArcLib's template linked list

Any ideas? I'd like to continue work on FreeUniverse.. but this has been a
show-stopper. :(

More information about the Digitalmars-d-learn mailing list