"Re: [xml] unresolved external symbol"



Igor Zlatkovic wrote:
Kasimier Buchcik wrote:
Igor Zlatkovic wrote:
Kasimier Buchcik wrote: einordnen

:-) Jesus, who wrote what?

I know this was asked many times before, but it seems that I still
cannot manage the problem; linking libxslt 1.0.33 (from cvs) against 
libxml2 2.6.0 (from cvs), I get the following errors:

numbers.obj : error LNK2001: unresolved external symbol _xmlCharInRange
pattern.obj : error LNK2001: unresolved external symbol _xmlCharInRange

I added xmlCharInRange to the win32/libxml2.def.src file and recompiled; 
the linker is still unhappy. Any hints about what is still missing?

This has been fixed, current CVS is okay.

Besides, the libxml2.def.src file is no longer being used. Symbols now have 
declarations which mark them as exportable.


I see. Hmm, guess the anonymous cvs lags just a bit... I still get these 
errors.
By the way, xmlCharInRange is declared in chvalid.h as follows:

XMLPUBFUN int XMLCALL
             xmlCharInRange(unsigned int val, const
mlChRangeGroupPtr group);

What has to be additionally done to mark it exportable?


It is allready marked as exportable. That XMLPUBFUN thing does the job.

I have no idea what you are doing wrong. I compiled libxml, libxslt, xmlsec 
and xsldbg yesterday with no such error.

1. Check the libxml2.dll with dumpbin and confirm that it exports 
xmlCharInRange.
2. Check the libxml2.lib with dumpbin and confirm that it mentions 
xmlCharInRange.
3. Make sure your linker finds the right import library. Perhaps there is 
another libxml2.lib on your disc which the linker picks up instead of the 
intended one.

Ciao,
Igor

dumpbin says that the produced libxml2.dll does *not* export 
xmlCharInRange; neither it is mentioned in libxml2.lib.

I checked the compile messages once again and found the following:
--------------
chvalid.c
..\chvalid.c(163) : warning C4028: formal parameter 2 different from 
declaration
--------------

in chvalid.c we got:

xmlCharInRange (unsigned int val, xmlChRangeGroupPtr rptr)

in chvalid.h we got:

XMLPUBFUN int XMLCALL
                xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group)

Note the different argument names "rptr" & "group" in both functions.
Could that be the reason why the function is not exported?


Greetings,

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]