You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Chris Franklin <CF...@dominator.com> on 2010/07/03 02:19:45 UTC

Error with Xalan-c 1.11.0 using Xerces 3.1.1 / ICU 3.2 MSVisualStudio 2005 VC8

We are currently running into issues concerning the compile of our
Visual Studio 2005 V8 Xalan-C 1.11.0 (trunk version) package:

 

            Xalan-c 1.11.0 trunk version, latest Xerces 3.1.1 and ICU
3.2 binary. (all as of June 30 - 2010)

 

            I am using the ICU as static linking 

            I have made necessary corrections to the XalanICU project -
AllInOneWithICU is built as release

                        > I have verified the corrections by viewing the
2008 Xalan V9 Project file settings. (I realize not all apply so I just
made necessary ones for the appropriate linking). 

 

            I was able to fix all the little include issues and finally
got all files to compile. At the very end, it tries to compile the
Xalan-C_1_11.dll and I receive the following error. 

 

>>>>>>>>>>>>> 

ICUBridge.obj : error LNK2001: unresolved external symbol "private: void
__thiscall icu_3_2::UnicodeString::doExtract(int,int,wchar_t *,int)const
" (?doExtract@UnicodeString@icu_3_2@@ABEXHHPA_WH@Z)

ICUBridge.obj : error LNK2001: unresolved external symbol "public:
__thiscall icu_3_2::UnicodeString::UnicodeString(wchar_t const *,int)"
(??0UnicodeString@icu_3_2@@QAE@PB_WH@Z)

ICUFormatNumberFunctor.obj : error LNK2001: unresolved external symbol
"public: __thiscall icu_3_2::UnicodeString::UnicodeString(wchar_t)"
(??0UnicodeString@icu_3_2@@QAE@_W@Z)

..\..\..\..\Build\Win32\VC8\Release\Xalan-C_1_11.dll : fatal error
LNK1120: 3 unresolved externals

 

Error executing link.exe (tool returned code: 1120)

 

AllInOneWithICU - 4 error(s), 0 warning(s)

>>>>>>>>>>>>>>> 

 

            What I was hoping was that you would be able to assist me
with getting this to work since I am nearly there. We are so close this
would be very much appreciated. Likewise, I would be happy to contribute
any findings I have. 

 

            Thank you, 

                        Chris Franklin

Software Engineer

DR Systems, Inc. 

cfranklin@dominator.com

 


Re: Error with Xalan-c 1.11.0 using Xerces 3.1.1 / ICU 3.2 MSVisualStudio 2005 VC8

Posted by David Bertoni <db...@apache.org>.
On 7/2/2010 5:19 PM, Chris Franklin wrote:
> We are currently running into issues concerning the compile of our
> Visual Studio 2005 V8 Xalan-C 1.11.0 (trunk version) package:
>
> Xalan-c 1.11.0 trunk version, latest Xerces 3.1.1 and ICU 3.2 binary.
> (all as of June 30 – 2010)
>
> I am using the ICU as static linking
>
> I have made necessary corrections to the XalanICU project –
> AllInOneWithICU is built as release
>
>>  I have verified the corrections by viewing the 2008 Xalan V9 Project
> file settings. (I realize not all apply so I just made necessary ones
> for the appropriate linking).
>
> I was able to fix all the little include issues and finally got all
> files to compile. At the very end, it tries to compile the
> Xalan-C_1_11.dll and I receive the following error.
>
>> >>>>>>>>>>>>
>
> ICUBridge.obj : error LNK2001: unresolved external symbol "private: void
> __thiscall icu_3_2::UnicodeString::doExtract(int,int,wchar_t *,int)const
> " (?doExtract@UnicodeString@icu_3_2@@ABEXHHPA_WH@Z)
>
> ICUBridge.obj : error LNK2001: unresolved external symbol "public:
> __thiscall icu_3_2::UnicodeString::UnicodeString(wchar_t const *,int)"
> (??0UnicodeString@icu_3_2@@QAE@PB_WH@Z)
>
> ICUFormatNumberFunctor.obj : error LNK2001: unresolved external symbol
> "public: __thiscall icu_3_2::UnicodeString::UnicodeString(wchar_t)"
> (??0UnicodeString@icu_3_2@@QAE@_W@Z)
>
> ..\..\..\..\Build\Win32\VC8\Release\Xalan-C_1_11.dll : fatal error
> LNK1120: 3 unresolved externals
>
> Error executing link.exe (tool returned code: 1120)
>
> AllInOneWithICU - 4 error(s), 0 warning(s)
>
>> >>>>>>>>>>>>>>
>
> What I was hoping was that you would be able to assist me with getting
> this to work since I am nearly there. We are so close this would be very
> much appreciated. Likewise, I would be happy to contribute any findings
> I have.
>
> Thank you,
I've never tried to link a Xalan-C DLL with a static ICU build, so I 
don't know if that combination will work, but there are several things 
you can check:

1. Make sure you're linking with the correct ICU libraries. That 
function should be in icuuc.lib or icuucd.lib.

2. Make sure the function is actually present in the library and is 
being exported. Use dumpbin.exe to export the symbols:

dumpbin /exports icuuc.lib | more >icuuc-exports.txt

Then, open this file with notepad and look for "doExtract". If it's 
there, make sure it matches _exactly_ with the linker error message:

?doExtract@UnicodeString@icu_3_2@@ABEXHHPA_WH@Z

The usual cause of this error is a mismatch in the type of wchar_t. In 
older versions of Visual Studio, the wchar_t was a typedef for unsigned 
short, rather than a proper type. There is a compiler switch 
(/Zc:wchar_t) that controls this behavior, and you must make it 
consistent across the ICU, Xerces-C and Xalan-C:

http://msdn.microsoft.com/en-us/library/dh8che7s(VS.80).aspx

Hope that helps. In the future, please subscribe to the Xalan-C user 
list and post questions specific to Xalan-C there:

http://xml.apache.org/mail.html#xalan-c-users

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org