digitalmars.D.learn - Linking Errors
- Phr00t (35/35) Jun 17 2008 Hey all,
- Denis Golovan (4/54) Jun 18 2008 Well, AFAIU linker cannot find compiled template linked list.
- Phr00t (6/63) Jun 18 2008 Thank you for your reply.
- Fawzi Mohamed (8/79) Jun 18 2008 - there might be a library or .o file conncted to arc that you have to l...
- Phr00t (7/93) Jun 18 2008 I am using DSSS + Rebuild to compile this program... (version 0.76 I bel...
- Denis Golovan (4/54) Jun 18 2008 Well, AFAIU linker cannot find compiled template linked list.
Hey all, I posted this problem to dsource.org, but I'm not sure how many faces see that forum... 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 `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist7__ClassZ' test.d:(.text._Dmain+0x30): undefined reference to `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist5_ctorMFZC3arc9templates11dlinkedlist40__T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist' I am using: * Ubuntu 8.04 * dmd v1.0.30 * GNU ld (GNU Binutils for Ubuntu) 2.18.0.20080103 * ArcLib's template linked list Any ideas? I'd like to continue work on FreeUniverse.. but this has been a show-stopper. :(
Jun 17 2008
Phr00t Wrote:Hey all, I posted this problem to dsource.org, but I'm not sure how many faces see that forum... 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 `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist7__ClassZ' test.d:(.text._Dmain+0x30): undefined reference to `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist5_ctorMFZC3arc9templates11dlinkedlist40__T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist' I am using: * Ubuntu 8.04 * dmd v1.0.30 * GNU ld (GNU Binutils for Ubuntu) 2.18.0.20080103 * ArcLib's template linked list Any ideas? I'd like to continue work on FreeUniverse.. but this has been a show-stopper. :(Well, AFAIU linker cannot find compiled template linked list. So, maybe command line (makefile) for compilation does not include template linked list compiled object file? Best regards, Denis
Jun 18 2008
Denis Golovan Wrote:Phr00t Wrote:Thank you for your reply. If it did not include the linked list object file, then wouldn't it also complain about this line? dlinkedlist!(FU_SHIP) OKShipList = new dlinkedlist!(FU_SHIP); Because it only complains about FU_ITEM's dlinkedlist :-( - Phr00tHey all, I posted this problem to dsource.org, but I'm not sure how many faces see that forum... 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 `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist7__ClassZ' test.d:(.text._Dmain+0x30): undefined reference to `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist5_ctorMFZC3arc9templates11dlinkedlist40__T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist' I am using: * Ubuntu 8.04 * dmd v1.0.30 * GNU ld (GNU Binutils for Ubuntu) 2.18.0.20080103 * ArcLib's template linked list Any ideas? I'd like to continue work on FreeUniverse.. but this has been a show-stopper. :(Well, AFAIU linker cannot find compiled template linked list. So, maybe command line (makefile) for compilation does not include template linked list compiled object file? Best regards, Denis
Jun 18 2008
On 2008-06-18 14:59:59 +0200, Phr00t <phr00t gmail.com> said:Denis Golovan Wrote:IPhr00t Wrote:Hey all, I posted this problem to dsource.org, but I'm not sure how many faces see that forum... 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 `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist7__ClassZ' test.d:(.text._Dmain+0x30): undefined reference to `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist5_ctorMFZC3arc9templates11dlinkedlist40__T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist'- there might be a library or .o file conncted to arc that you have to link In general (not directly connected with your problem) - use dsss to build you stuff (normally it figures out the dependencies) - be careful to to mix phobos/tango librares unless you use tango+tangobos (and even then be careful) FawziThank you for your reply. If it did not include the linked list object file, then wouldn't it also complain about this line? dlinkedlist!(FU_SHIP) OKShipList = new dlinkedlist!(FU_SHIP); Because it only complains about FU_ITEM's dlinkedlist :-( - Phr00tam using: * Ubuntu 8.04 * dmd v1.0.30 * GNU ld (GNU Binutils for Ubuntu) 2.18.0.20080103 * ArcLib's template linked list Any ideas? I'd like to continue work on FreeUniverse.. but this has been a show-stopper. :(Well, AFAIU linker cannot find compiled template linked list. So, maybe command line (makefile) for compilation does not include template linked list compiled object file? Best regards, Denis
Jun 18 2008
Fawzi Mohamed Wrote:On 2008-06-18 14:59:59 +0200, Phr00t <phr00t gmail.com> said:I am using DSSS + Rebuild to compile this program... (version 0.76 I believe) I'm fully compiling ArcLib v.1 from source, and not linking to any pre-compiled libraries... I'm pretty certain there is no tango or tangobos in my source... purely phobos. I'm wondering if changing that DSSS Rebuild option to do linking "all at once" instead of "one at a time" might fix things...? (I'll give it a try next...) Thank you for your response! - JeremyDenis Golovan Wrote:IPhr00t Wrote:Hey all, I posted this problem to dsource.org, but I'm not sure how many faces see that forum... 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 `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist7__ClassZ' test.d:(.text._Dmain+0x30): undefined reference to `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist5_ctorMFZC3arc9templates11dlinkedlist40__T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist'- there might be a library or .o file conncted to arc that you have to link In general (not directly connected with your problem) - use dsss to build you stuff (normally it figures out the dependencies) - be careful to to mix phobos/tango librares unless you use tango+tangobos (and even then be careful) FawziThank you for your reply. If it did not include the linked list object file, then wouldn't it also complain about this line? dlinkedlist!(FU_SHIP) OKShipList = new dlinkedlist!(FU_SHIP); Because it only complains about FU_ITEM's dlinkedlist :-( - Phr00tam using: * Ubuntu 8.04 * dmd v1.0.30 * GNU ld (GNU Binutils for Ubuntu) 2.18.0.20080103 * ArcLib's template linked list Any ideas? I'd like to continue work on FreeUniverse.. but this has been a show-stopper. :(Well, AFAIU linker cannot find compiled template linked list. So, maybe command line (makefile) for compilation does not include template linked list compiled object file? Best regards, Denis
Jun 18 2008
Phr00t Wrote:Hey all, I posted this problem to dsource.org, but I'm not sure how many faces see that forum... 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 `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist7__ClassZ' test.d:(.text._Dmain+0x30): undefined reference to `_D3arc9templates11dlinkedlist40__ T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist5_ctorMFZC3arc9templates11dlinkedlist40__T11dlinkedlistTC7classes4item7FU_ITEMZ11dlinkedlist' I am using: * Ubuntu 8.04 * dmd v1.0.30 * GNU ld (GNU Binutils for Ubuntu) 2.18.0.20080103 * ArcLib's template linked list Any ideas? I'd like to continue work on FreeUniverse.. but this has been a show-stopper. :(Well, AFAIU linker cannot find compiled template linked list. So, maybe command line (makefile) for compilation does not include template linked list compiled object file? Best regards, Denis
Jun 18 2008