www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Link Problem

reply Qian Xu <quian.xu stud.tu-ilmenau.de> writes:
Hi All (again),


I got the following error message when my program is going to be linked:

------------------------ error -------------------------------
default/common/configuration/Configuration_1.o:(.data+0x98): undefined 
reference to `_D5tango4text3xml9SaxParser12_ModuleInfoZ'
------------------------ error -------------------------------

Configuration_1.o is the output file of my source.
I compiled my program on two Linux machines. It works on one machine, 
but not the other.

I suppose:
1. the tango libraries are different. (I will verify it tomorrow in my 
office)
2. the SaxParser contains some template implementation. how this part is 
compiled? can this be a reason of my problem?

BTW: What is ModuleInfoZ?? I have not found it in SaxParser.d at all.



-- 
Xu, Qian (stanleyxu)
  http://stanleyxu2005.blogspot.com
Mar 03 2009
parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
"Qian Xu" wrote
 Hi All (again),


 I got the following error message when my program is going to be linked:

 ------------------------ error -------------------------------
 default/common/configuration/Configuration_1.o:(.data+0x98): undefined 
 reference to `_D5tango4text3xml9SaxParser12_ModuleInfoZ'
 ------------------------ error -------------------------------

 Configuration_1.o is the output file of my source.
 I compiled my program on two Linux machines. It works on one machine, but 
 not the other.

 I suppose:
 1. the tango libraries are different. (I will verify it tomorrow in my 
 office)
 2. the SaxParser contains some template implementation. how this part is 
 compiled? can this be a reason of my problem?

 BTW: What is ModuleInfoZ?? I have not found it in SaxParser.d at all.
ModuleInfo is the instance of the ModuleInfo class that the compiler generates for a d source file. Every compiled file has one. this shows all ModuleInfo instances in tango: nm libtango*.a | grep ModuleInfo It appears that the SaxParser module is not defined in the library. I would guess that your tango lib is not compiled from the .d files you are using for imports, one of those two is out of date. -Steve
Mar 03 2009
parent Qian Xu <quian.xu stud.tu-ilmenau.de> writes:
Steven Schveighoffer wrote:

 It appears that the SaxParser module is not defined in the library.  I
 would guess that your tango lib is not compiled from the .d files you are
 using for imports, one of those two is out of date.
 
 -Steve
Thanks. The build system links with another SaxParser --Qian Xu
Mar 04 2009