Hi,

I was working more on the issue....

I could able to execute successfully the same StreamTransform.cpp code on
VisualStudio 2003 .NET.  again I am using XALAN 1.10 and Xerces 2.7

But it is failing on VS 2008.  Do you think of or know any property
difference between VS 2003 and VS 2008 which is causing the issue.  Or may
be all the libs and DLLs were built on Visual Studio 6, and has dependency
on MSVCRT60.DLL ......

May be due to this reason it is not working in VS 2008....

Any idea or tip ......

Also I am getting multiple warnings while compliling


StreamTransform.cpp

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(279)
: warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2576) :
see declaration of 'std::copy'

1>
c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(271)
: while compiling class template member function 'unsigned short
*xalanc_1_10::XalanVector<Type>::erase(unsigned short *,unsigned short *)'

1> with

1> [

1> Type=xalanc_1_10::XalanDOMChar

1> ]

1>
c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\xalandom\xalandomstring.hpp(55)
: see reference to class template instantiation
'xalanc_1_10::XalanVector<Type>' being compiled

1> with

1> [

1> Type=xalanc_1_10::XalanDOMChar

1> ]

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(838)
: warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2576) :
see declaration of 'std::copy'

1>
c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(803)
: while compiling class template member function
'xalanc_1_10::XalanVector<Type> &xalanc_1_10::XalanVector<Type>::operator
=(const xalanc_1_10::XalanVector<Type> &)'

1> with

1> [

1> Type=xalanc_1_10::XalanDOMChar

1> ]

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(386)
: warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2576) :
see declaration of 'std::copy'

1>
c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(300)
: while compiling class template member function 'void
xalanc_1_10::XalanVector<Type>::insert(unsigned short *,const unsigned short
*,const unsigned short *)'

1> with

1> [

1> Type=xalanc_1_10::XalanDOMChar

1> ]

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(403)
: warning C4996: 'std::copy_backward': Function call with parameters that
may be unsafe - this call relies on the caller to check that the passed
values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.
See documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2729) :
see declaration of 'std::copy_backward'

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(406)
: warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2576) :
see declaration of 'std::copy'

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(386)
: warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2576) :
see declaration of 'std::copy'

1>
c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(300)
: while compiling class template member function 'void
xalanc_1_10::XalanVector<Type>::insert(char *,const char *,const char *)'

1> with

1> [

1> Type=char

1> ]

1>
c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\xalandom\xalandomstring.hpp(1042)
: see reference to class template instantiation
'xalanc_1_10::XalanVector<Type>' being compiled

1> with

1> [

1> Type=char

1> ]

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(403)
: warning C4996: 'std::copy_backward': Function call with parameters that
may be unsafe - this call relies on the caller to check that the passed
values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.
See documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2729) :
see declaration of 'std::copy_backward'

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(406)
: warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2576) :
see declaration of 'std::copy'

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(386)
: warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2576) :
see declaration of 'std::copy'

1>
c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(300)
: while compiling class template member function 'void
xalanc_1_10::XalanVector<Type>::insert(xalanc_1_10::TraceListener
**,xalanc_1_10::TraceListener *const *,xalanc_1_10::TraceListener *const *)'

1> with

1> [

1> Type=xalanc_1_10::TraceListener *

1> ]

1>
c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\xalantransformer\xalantransformer.hpp(1051)
: see reference to class template instantiation
'xalanc_1_10::XalanVector<Type>' being compiled

1> with

1> [

1> Type=xalanc_1_10::TraceListener *

1> ]

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(403)
: warning C4996: 'std::copy_backward': Function call with parameters that
may be unsafe - this call relies on the caller to check that the passed
values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS.
See documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2729) :
see declaration of 'std::copy_backward'

1>c:\share\streamtransform\xalan-c_1_10_0-win32-msvc_60\include\xalanc\include\xalanvector.hpp(406)
: warning C4996: 'std::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2576) :
see declaration of 'std::copy'

1>Compiling manifest to resources...

1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1

1>Copyright (C) Microsoft Corporation. All rights reserved.

1>Linking...

~Dinesh
On Thu, Oct 6, 2011 at 9:15 AM, Dinesh Behl <dinesh.b...@gmail.com> wrote:

> Any help is appericiated,  I am struggling with this issue since
> long....and I have to fix this issue....for my project....
>
> Please help...
>
>  On Wed, Oct 5, 2011 at 11:20 AM, Dinesh Behl <dinesh.b...@gmail.com>wrote:
>
>> Hi,
>>
>> I also tried giving
>>
>>
>> const
>> XMLCh *const foo = reinterpret_cast<const XMLCh *const>("foo");
>>
>> inputSource.setSystemId(foo);
>>
>> Then it compiles but gives linker error
>>
>> error LNK2019: unresolved external symbol "__declspec(dllimport) public:
>> virtual void __thiscall xercesc_2_7::InputSource::setSystemId(wchar_t const
>> * const)" (__imp_?setSystemId@InputSource@xercesc_2_7@@UAEXQB_W@Z)
>> referenced in function _main
>>
>> 1>C:\srcLME\StreamTransform\test\Debug\test.exe : fatal error LNK1120: 1
>> unresolved externals
>>
>> Dinesh
>>
>>
>> 2011/10/5 <kesh...@us.ibm.com>
>>
>> The compiler is telling you that you're passing in the wrong kind of
>>> string. The function expects XMLCh chararacters, not XalanDOMChar
>>> characters.
>>>
>>>
>>> ______________________________________
>>> "You build world of steel and stone
>>> I build worlds of words alone
>>> Skilled tradespeople, long years taught:
>>> You shape matter; I shape thought."
>>> (http://www.songworm.com/lyrics/songworm-parody/ShapesofShadow.html)
>>>
>>> Dinesh Behl <dinesh.b...@gmail.com> wrote on 10/05/2011 10:11:52 AM:
>>>
>>> > From:
>>> >
>>> > Dinesh Behl <dinesh.b...@gmail.com>
>>> >
>>> > To:
>>> >
>>> > xalan-dev@xml.apache.org
>>> >
>>> > Date:
>>> >
>>> > 10/05/2011 10:12 AM
>>> >
>>> > Subject:
>>> >
>>> > Re: Issue related to Stream Transform on Windows.
>>>  >
>>> > Hi,
>>> >
>>> > Thanks for the reply.
>>> >
>>> > If I won't change the project settings to (treat wChar_t as built in
>>> > type = NO) then I got following error
>>> > error C2664: 'xercesc_2_7::InputSource::setSystemId' : cannot
>>> > convert parameter 1 from 'const xalanc_1_10::XalanDOMChar *' to
>>> > 'const XMLCh *const '1> Types pointed to are unrelated; conversion
>>> > requires reinterpret_cast, C-style cast or function-style cast
>>> > and even after reinterpret_cast Igot the error.
>>> > Dinesh
>>> >
>>>
>>> > 2011/10/5 <kesh...@us.ibm.com>
>>> > First step: Can you build and run without your change?
>>> >
>>> > If so: The code thinks your change is incorrect, since it is having
>>> > unintended effects. Ask whether you really need this change at all,
>>> > and/or whether there's another way to accomplish what you need. You
>>> > SHOULDN'T have to patch code to handle a simple setSystemId call.
>>> >
>>> >
>>> > ______________________________________
>>> > "You build world of steel and stone
>>> > I build worlds of words alone
>>> > Skilled tradespeople, long years taught:
>>> > You shape matter; I shape thought."
>>> > (http://www.songworm.com/lyrics/songworm-parody/ShapesofShadow.html)
>>> >
>>> > Dinesh Behl <dinesh.b...@gmail.com> wrote on 10/05/2011 09:45:54 AM:
>>> >
>>> > > From:
>>> > >
>>> > > Dinesh Behl <dinesh.b...@gmail.com>
>>> > >
>>> > > To:
>>> > >
>>> > > xalan-dev@xml.apache.org
>>> > >
>>> > > Date:
>>> > >
>>> > > 10/05/2011 09:46 AM
>>> > >
>>> > > Subject:
>>> > >
>>> > > Issue related to Stream Transform on Windows.
>>> > >
>>> > > Hi,
>>> > > I am trying to debug the StreamTransform sample given along with
>>> > > Xalan 1.10 package, it is build successfully with a change in the
>>> > > project (treat wChar_t as built in type = NO) to solve linking
>>> problem of
>>> > > "inputSource.setSystemId(XalanDOMString("foo").c_str()); "
>>> > > File used
>>> > > : StreamTransform.cpp
>>> > > Environment
>>> > > : Visual Studio 2008, Windows Server 2008 Standard
>>> > > Packages
>>> > > : Xalan 1.10 , Xerces 2.7
>>> > > Everything works fine but it crashes at the statement
>>> > >                                      int theResult =
>>> > > theXalanTransformer.transform(&theXMLStream, inputSource, cout);
>>> > > Can anyone please suggest me what I am doing wrong. I am using the
>>> > > code as provided in the sample, NO Change.
>>> > > Thanks
>>> > > Dinesh[attachment "StreamTransform.cpp" deleted by Joseph Kesselman/
>>> > > Watson/IBM]
>>> > > ---------------------------------------------------------------------
>>> > > To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org
>>> > > For additional commands, e-mail: xalan-dev-h...@xml.apache.org
>>>
>>
>>
>

Reply via email to