Forum Navigation
Link time: multiple definitions
Posted: 07/25/08 13:49:59Hello, I'm using last (SVN) Tango checkout.
I have a project with multiple files, the main called MyProj?.d, importing the module of VectorPath?.d, this last file imports tango.text.xml.Document, when linking, I obtain :
dsss_objs/D/_VectorPath.o:(.rodata+0x860): multiple definition of `_D5tango4text3xml8Document15T8DocumentTaZ8Document7Visitor6initZ' dsss_objs/D/_MyProj.o:(.rodata+0x1868): first defined here dsss_objs/D/_VectorPath.o:(.rodata+0x870): multiple definition of `_D5tango4text3xml8Document15T8DocumentTaZ8Document8NodeImpl6initZ' dsss_objs/D/_MyProj.o:(.rodata+0x1870): first defined here dsss_objs/D/_VectorPath.o:(.rodata+0x8b8): multiple definition of `_D5tango4text3xml8Document14T7XmlPathTaZ7XmlPath7NodeSet6initZ' dsss_objs/D/_MyProj.o:(.rodata+0x18b8): first defined here collect2: ld returned 1 exit status --- errorlevel 1
tango.text.xml.Document is not imported in MyProj?.d (though it does not change anything if I import it there). My imports are set to private in all files.
If I remove the code using Document (but not necessarily the import statement) and I put this code in the file MyProj?.d (and add the corresponding import statement) it compiles fine.
Someone has a clue ?
My dsss.conf file looks like this : [src/MyProj.d] type = binary target = myProj
+ some imports and flags, etc