You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Dyuti Barma <dy...@gmail.com> on 2008/11/28 09:39:00 UTC

Xalan with VC++8

Hi,

I'm working on compiling Xalan and Xerces with VC++8 .
I've found the link to the project...
http://svn.apache.org/repos/asf/xalan/c/trunk/Projects/Win32/VC8/

However, I'm unable to download it. Could anyone tell me how/where to
download it from ?

Thanks
Dyuti

Re: Xalan with VC++8

Posted by David Bertoni <db...@apache.org>.
Dyuti Barma wrote:
> Hi,
> 
> I'm pretty close to compiling my project with VC++8. However, I'm not 
> sure how best to remove the following warnings. Do I simply use the flag 
> mentioned ? Or is there any other way to get rid of these warnings ?
The easiest way, as the warning states, is to define 
_SCL_SECURE_NO_WARNINGS in your project.  Xalan-C uses _SECURE_SCL=0 to 
turn off all of the Microsoft-specific "security" warnings.

Dave

Re: Xalan with VC++8

Posted by Dyuti Barma <dy...@gmail.com>.
Hi,

I'm pretty close to compiling my project with VC++8. However, I'm not sure
how best to remove the following warnings. Do I simply use the flag
mentioned ? Or is there any other way to get rid of these warnings ?

*thirdparty\xalanc/Include/XalanVector.hpp(274) : 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 war use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use
Visual C++ 'Checked Iterators'

thirdparty\xalanc/Include/XalanVector.hpp(266) : while compiling class
template member function 'unsigned short
*xalanc_1_11::XalanVector<Type>::erase(unsigned short *,unsigned short *)'
        with
        [
            Type=xalanc_1_11::XalanDOMChar
        ]
        thirdparty\xalanc/XalanDOM/XalanDOMString.hpp(59) : see reference to
class template instantiation 'xalanc_1_11::XalanVector<Type>' being compiled
        with
        [
            Type=xalanc_1_11::XalanDOMChar
        ]*

On Wed, Dec 3, 2008 at 1:18 AM, Hans Smit <jc...@xs4all.nl> wrote:

> It seems like Dyuti and I got into a one-on-one thread. I must remember to
> use "reply all". Here is the rest of the thread for those of you who are
> interested: (it seems to be a recurring theme - the "building" theme...)
>
>
> Tuesday, December 02, 2008 19:27 Hans Smit wrote:
>
> Once again, I vaguely remember having a similar problem (with Xalanc_1_10 /
> 1_11 mix up). I think I had to double check that my project linking with the
> xalanc include + the xalanc library directories were to the newly compiled
> XalanC. I also remember having some dll dependencies that had to be
> recompiled (they were throwing dll inconsistent linkage errors). It all came
> down to carelessness on my part, so I didn't bother making any notes on
> this. I'm not sure this is the problem your having though.
>
> I assume you did manage to compile the XalanMsgLib project? It is important
> that you take nothing from the previous xalanc version.
>
> I would suggest starting a project from scratch and just try to compile a
> short xalanc function call. If this doesn't work, you at least have
> something to share with the rest (that we can try to debug). Have you tried
> compiling and running any of the XalanC examples?
>
> It's a shame every one has a different way of saying "char" in C++. Would
> you like a 'w_' with that, a 'XalanDomChar', or a 'XMLCh' with your encoding
> today sir? Or would you like it s8, u8, u16 or the super duper u32? :-)  I
> guess that was my pathetic excuse of a joke... encodings and locale have
> been the bane of my existance since I started working with XML related
> technologies.
>
> Hans
> ----- Original Message ----- From: Dyuti Barma
> To: Hans Smit
> Sent: Tuesday, December 02, 2008 18:54
> Subject: Re: Xalan with VC++8
>
>
> Comments inline -
>
>
> On Tue, Dec 2, 2008 at 7:51 PM, Hans Smit wrote:
>
> I vaguely remember having similar problems, and if my memory serves me
> correctly...
>
> Check out the following settings in MSVC++ Project Properties:
>
> General->Character Set = Not set
> C++ -> Language -> Treat w_char as built in type = Yes
>
> Yep, these settings seem to be in order. Still getting the same errors.
> What I can't understand is - Why are the errors referring to Xalanc_1_10
> when I've replaced it by the new Xalanc_1_11 . Any clue ?
>
>
>
> Make sure the settings in the XalanC / XercesC and your own project match.
> This is very important.
>
> I hope this helps. Let us know.
>
> Cheers,
>
> Hans
>
>
>  Hey,
>>
>> Finally built Xalan-c. Phew !!
>> (by removing all the .rc files)
>> And I can totally imagine how you felt when you saw the success message
>> ...Thanks a ton :-)
>>
>> And if I'm not asking for too much, can you tell me why I'm getting the
>> following errors while building my application with the latest Xalan ?
>> Thing to be noted is that - the error messages still refer to xalanc_1_10
>> instead of xalanc_1_11. Do you know why thats happening ?
>>
>>  xalanc/DOMSupport/DOMServices.hpp(571) : error C2664: 'void (const
>> XMLCh *const ,const unsigned int)' : cannot convert parameter 1 from
>> 'const xalanc_1_10::XalanDOMChar *' to 'const XMLCh *const '
>>
>>
>>
>>         Types pointed to are unrelated; conversion requires
>> reinterpret_cast, C-style cast or function-style cast
>>  xalanc/XPath/XObject.hpp(339) : error C2664: 'void (const XMLCh
>> *const,const unsigned int)' : cannot convert parameter 1 from 'const
>> xalanc_1_10::XalanDOMChar *' to 'const XMLCh *const '
>>
>>
>>
>>         Types pointed to are unrelated; conversion requires
>> reinterpret_cast, C-style cast or function-style cast
>>  xalanc/XPath/XObject.hpp(343) : error C2664: 'void (const  XMLCh
>> *const,const unsigned int)' : cannot convert parameter 1 from 'const
>> xalanc_1_10::XalanDOMChar *' to 'const XMLCh *const '
>>
>>
>>
>> On Tue, Dec 2, 2008 at 6:05 PM, Hans Smit wrote:
>>
>>  You are most likely compiling with VC++8 Express Edition. The express
>>> edition does not include the resource builder. To get it to build
>>> properly, remove all the .rc files from the projects you are going to
>>> compile.
>>>
>>> I'm not sure why XalanC developers included any .rc files. I'm not sure
>>> what purpose they serve in a non-gui application.
>>>
>>> Also, be sure you get the xalanmessages_1_11.lib to build, and make sure
>>> your project knows where to locate it. Without it, you are out of luck
>>> building xalanc. Isn't building fun? ;-) And just think, it's much
>>> easier
>>> than it was a couple of years ago. Back then, I spent an entire night
>>> trying to figure out how to build XalanC. I guess you can image how
>>> pleased I was when I saw the build message stating 0 errors.
>>>
>>> Hans
>>>
>>
>
>
> ----- Original Message ----- From: "David Bertoni" <db...@apache.org>
> To: <xa...@xml.apache.org>
> Sent: Tuesday, December 02, 2008 20:30
> Subject: Re: Xalan with VC++8
>
>
>  Dyuti Barma wrote:
>>
>>> fwiw, I was unable to build XAlanMsgLib due to following error :
>>> cannot open include file 'winres.h'
>>>
>>> What can I do to resolve this ?
>>>
>> Make sure you've installed the minimal amount of the ATL/MFC frameworks as
>> you can.  Unfortunately, that file is only installed by those components.
>>
>> Dave
>>
>>
>

Re: Xalan with VC++8

Posted by Hans Smit <jc...@xs4all.nl>.
It seems like Dyuti and I got into a one-on-one thread. I must remember to 
use "reply all". Here is the rest of the thread for those of you who are 
interested: (it seems to be a recurring theme - the "building" theme...)


Tuesday, December 02, 2008 19:27 Hans Smit wrote:

Once again, I vaguely remember having a similar problem (with Xalanc_1_10 / 
1_11 mix up). I think I had to double check that my project linking with the 
xalanc include + the xalanc library directories were to the newly compiled 
XalanC. I also remember having some dll dependencies that had to be 
recompiled (they were throwing dll inconsistent linkage errors). It all came 
down to carelessness on my part, so I didn't bother making any notes on 
this. I'm not sure this is the problem your having though.

I assume you did manage to compile the XalanMsgLib project? It is important 
that you take nothing from the previous xalanc version.

I would suggest starting a project from scratch and just try to compile a 
short xalanc function call. If this doesn't work, you at least have 
something to share with the rest (that we can try to debug). Have you tried 
compiling and running any of the XalanC examples?

It's a shame every one has a different way of saying "char" in C++. Would 
you like a 'w_' with that, a 'XalanDomChar', or a 'XMLCh' with your encoding 
today sir? Or would you like it s8, u8, u16 or the super duper u32? :-)  I 
guess that was my pathetic excuse of a joke... encodings and locale have 
been the bane of my existance since I started working with XML related 
technologies.

Hans
----- Original Message ----- 
From: Dyuti Barma
To: Hans Smit
Sent: Tuesday, December 02, 2008 18:54
Subject: Re: Xalan with VC++8


Comments inline -


On Tue, Dec 2, 2008 at 7:51 PM, Hans Smit wrote:

I vaguely remember having similar problems, and if my memory serves me
correctly...

Check out the following settings in MSVC++ Project Properties:

General->Character Set = Not set
C++ -> Language -> Treat w_char as built in type = Yes

Yep, these settings seem to be in order. Still getting the same errors. What 
I can't understand is - Why are the errors referring to Xalanc_1_10 when 
I've replaced it by the new Xalanc_1_11 . Any clue ?



Make sure the settings in the XalanC / XercesC and your own project match.
This is very important.

I hope this helps. Let us know.

Cheers,

Hans


> Hey,
>
> Finally built Xalan-c. Phew !!
> (by removing all the .rc files)
> And I can totally imagine how you felt when you saw the success message
> ...Thanks a ton :-)
>
> And if I'm not asking for too much, can you tell me why I'm getting the
> following errors while building my application with the latest Xalan ?
> Thing to be noted is that - the error messages still refer to xalanc_1_10
> instead of xalanc_1_11. Do you know why thats happening ?
>
>  xalanc/DOMSupport/DOMServices.hpp(571) : error C2664: 'void (const
> XMLCh *const ,const unsigned int)' : cannot convert parameter 1 from
> 'const xalanc_1_10::XalanDOMChar *' to 'const XMLCh *const '
>
>
>
>          Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>  xalanc/XPath/XObject.hpp(339) : error C2664: 'void (const XMLCh
> *const,const unsigned int)' : cannot convert parameter 1 from 'const
> xalanc_1_10::XalanDOMChar *' to 'const XMLCh *const '
>
>
>
>          Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>  xalanc/XPath/XObject.hpp(343) : error C2664: 'void (const  XMLCh
> *const,const unsigned int)' : cannot convert parameter 1 from 'const
> xalanc_1_10::XalanDOMChar *' to 'const XMLCh *const '
>
>
>
> On Tue, Dec 2, 2008 at 6:05 PM, Hans Smit wrote:
>
>> You are most likely compiling with VC++8 Express Edition. The express
>> edition does not include the resource builder. To get it to build
>> properly, remove all the .rc files from the projects you are going to
>> compile.
>>
>> I'm not sure why XalanC developers included any .rc files. I'm not sure
>> what purpose they serve in a non-gui application.
>>
>> Also, be sure you get the xalanmessages_1_11.lib to build, and make sure
>> your project knows where to locate it. Without it, you are out of luck
>> building xalanc. Isn't building fun? ;-) And just think, it's much
>> easier
>> than it was a couple of years ago. Back then, I spent an entire night
>> trying to figure out how to build XalanC. I guess you can image how
>> pleased I was when I saw the build message stating 0 errors.
>>
>> Hans



----- Original Message ----- 
From: "David Bertoni" <db...@apache.org>
To: <xa...@xml.apache.org>
Sent: Tuesday, December 02, 2008 20:30
Subject: Re: Xalan with VC++8


> Dyuti Barma wrote:
>> fwiw, I was unable to build XAlanMsgLib due to following error :
>> cannot open include file 'winres.h'
>>
>> What can I do to resolve this ?
> Make sure you've installed the minimal amount of the ATL/MFC frameworks as 
> you can.  Unfortunately, that file is only installed by those components.
>
> Dave
> 


Re: Xalan with VC++8

Posted by David Bertoni <db...@apache.org>.
Dyuti Barma wrote:
> fwiw, I was unable to build XAlanMsgLib due to following error :
> cannot open include file 'winres.h'
> 
> What can I do to resolve this ?
Make sure you've installed the minimal amount of the ATL/MFC frameworks 
as you can.  Unfortunately, that file is only installed by those components.

Dave

Re: Xalan with VC++8

Posted by Dyuti Barma <dy...@gmail.com>.
fwiw, I was unable to build XAlanMsgLib due to following error :
cannot open include file 'winres.h'

What can I do to resolve this ?

On Tue, Dec 2, 2008 at 4:26 PM, Dyuti Barma <dy...@gmail.com> wrote:

> Hi David,
>
> I followed the instructions for downloading and building with the head of
> the repository @ https://issues.apache.org/jira/browse/XALANC-684
> However, after building the AllInOne project for *Windows (VC++8)*, I'm
> getting the following error :
> LINK : fatal error LNK1181: cannot open input file
> '..\..\..\..\build\win32\vc8\release\xalanmessages_1_11.lib'
>
> Can you tell me what I'm missing out on ?
>
> Thanks
> Dyuti
>
>
> On Sat, Nov 29, 2008 at 1:02 AM, David Bertoni <db...@apache.org>wrote:
>
>> Dyuti Barma wrote:
>>
>>> Hi,
>>>
>>> I'm working on compiling Xalan and Xerces with VC++8 .
>>> I've found the link to the project...
>>> http://svn.apache.org/repos/asf/xalan/c/trunk/Projects/Win32/VC8/ <
>>> http://svn.apache.org/repos/asf/xalan/c/trunk/Projects/Win32/VC8/>
>>> However, I'm unable to download it. Could anyone tell me how/where to
>>> download it from ?
>>>
>> If you're working on Windows, I suggest you install TortoiseSVN for access
>> to the Subversion repository.
>>
>> Hans Smit made added some comments to this Jira issue with instructions
>> for downloading and building with the head of the repository:
>>
>> https://issues.apache.org/jira/browse/XALANC-684
>>
>> Dave
>>
>>
>

Re: Xalan with VC++8

Posted by Dyuti Barma <dy...@gmail.com>.
Hi David,

I followed the instructions for downloading and building with the head of
the repository @ https://issues.apache.org/jira/browse/XALANC-684
However, after building the AllInOne project for *Windows (VC++8)*, I'm
getting the following error :
LINK : fatal error LNK1181: cannot open input file
'..\..\..\..\build\win32\vc8\release\xalanmessages_1_11.lib'

Can you tell me what I'm missing out on ?

Thanks
Dyuti

On Sat, Nov 29, 2008 at 1:02 AM, David Bertoni <db...@apache.org> wrote:

> Dyuti Barma wrote:
>
>> Hi,
>>
>> I'm working on compiling Xalan and Xerces with VC++8 .
>> I've found the link to the project...
>> http://svn.apache.org/repos/asf/xalan/c/trunk/Projects/Win32/VC8/ <
>> http://svn.apache.org/repos/asf/xalan/c/trunk/Projects/Win32/VC8/>
>> However, I'm unable to download it. Could anyone tell me how/where to
>> download it from ?
>>
> If you're working on Windows, I suggest you install TortoiseSVN for access
> to the Subversion repository.
>
> Hans Smit made added some comments to this Jira issue with instructions for
> downloading and building with the head of the repository:
>
> https://issues.apache.org/jira/browse/XALANC-684
>
> Dave
>
>

Re: Xalan with VC++8

Posted by David Bertoni <db...@apache.org>.
Dyuti Barma wrote:
> Hi,
> 
> I'm working on compiling Xalan and Xerces with VC++8 .
> I've found the link to the project... 
> http://svn.apache.org/repos/asf/xalan/c/trunk/Projects/Win32/VC8/ 
> <http://svn.apache.org/repos/asf/xalan/c/trunk/Projects/Win32/VC8/>
> However, I'm unable to download it. Could anyone tell me how/where to 
> download it from ?
If you're working on Windows, I suggest you install TortoiseSVN for 
access to the Subversion repository.

Hans Smit made added some comments to this Jira issue with instructions 
for downloading and building with the head of the repository:

https://issues.apache.org/jira/browse/XALANC-684

Dave