You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Meir Yanovich <me...@gmail.com> on 2008/10/12 17:01:23 UTC

Compilation windows/unix failer in version 2.7

Hello all
i was using xerces c version 2.3 with my code and every thing worked
right now i upgraded to version 2.7
and when i compile ( windows first with vc 6 ) im getting this error :
\xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(633)
: error C2059: syntax error : 'constant'
\xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(761)
: error C2660: 'InnerAssert' : function does not take 5 parameters
\xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(766)
: error C2660: 'InnerAssert' : function does not take 5 parameters
\xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(772)
: error C2059: syntax error : 'constant'

i comment must of my code including the xerces include files and found
out the error comes from  the include file
#include <xercesc/parsers/XercesDOMParser.hpp>

can someone please tell me what im missing here ? why it doesn't compile ?
Thanks allot

Re: Compilation windows/unix failer in version 2.7

Posted by Alberto Massari <am...@datadirect.com>.
Meir Yanovich wrote:
> Thanks it seams to work , can you explain me how did you understand
> that this is the problem
>   

The "syntax error : 'constant'" means that something in that line was 
converted into a constant; the other two errors point to a line where 
Assert (with two arguments) is used, but the error complains about 
"InnerAssert" not having 5 arguments. So it must be that somewhere you have

#define Assert(X) InnerAssert(1,2,3,X)

Alberto

> Thanks allot
>
> On Wed, Oct 15, 2008 at 9:25 AM, Alberto Massari
> <am...@datadirect.com> wrote:
>   
>> The line 633 of XSerializeEngine.hpp is
>>
>>   inline void            Assert(bool  toEval
>>                               , const XMLExcepts::Codes toThrow)  const;
>>
>> and the same Assert occurs at the other locations; so I guess you have a
>> #define for an Assert macro that clashes with the method name.
>> Just be sure to include the Xerces headers before the header that contains
>> the definition, or add a #undef Assert before the Xerces ones.
>>
>> Hope this helps,
>> Alberto
>>
>> Meir Yanovich wrote:
>>     
>>> Hello sorry for posting this question again . but im looking for solution
>>> without any success so if someone know something please please help
>>> again sorry for posting again .
>>> thanks
>>>
>>> On Sun, Oct 12, 2008 at 5:01 PM, Meir Yanovich <me...@gmail.com> wrote:
>>>
>>>       
>>>> Hello all
>>>> i was using xerces c version 2.3 with my code and every thing worked
>>>> right now i upgraded to version 2.7
>>>> and when i compile ( windows first with vc 6 ) im getting this error :
>>>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(633)
>>>> : error C2059: syntax error : 'constant'
>>>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(761)
>>>> : error C2660: 'InnerAssert' : function does not take 5 parameters
>>>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(766)
>>>> : error C2660: 'InnerAssert' : function does not take 5 parameters
>>>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(772)
>>>> : error C2059: syntax error : 'constant'
>>>>
>>>> i comment must of my code including the xerces include files and found
>>>> out the error comes from  the include file
>>>> #include <xercesc/parsers/XercesDOMParser.hpp>
>>>>
>>>> can someone please tell me what im missing here ? why it doesn't compile
>>>> ?
>>>> Thanks allot
>>>>
>>>>
>>>>         
>>>
>>>       
>>     
>
>
>   


Re: Compilation windows/unix failer in version 2.7

Posted by Meir Yanovich <me...@gmail.com>.
Thanks it seams to work , can you explain me how did you understand
that this is the problem
Thanks allot

On Wed, Oct 15, 2008 at 9:25 AM, Alberto Massari
<am...@datadirect.com> wrote:
> The line 633 of XSerializeEngine.hpp is
>
>   inline void            Assert(bool  toEval
>                               , const XMLExcepts::Codes toThrow)  const;
>
> and the same Assert occurs at the other locations; so I guess you have a
> #define for an Assert macro that clashes with the method name.
> Just be sure to include the Xerces headers before the header that contains
> the definition, or add a #undef Assert before the Xerces ones.
>
> Hope this helps,
> Alberto
>
> Meir Yanovich wrote:
>>
>> Hello sorry for posting this question again . but im looking for solution
>> without any success so if someone know something please please help
>> again sorry for posting again .
>> thanks
>>
>> On Sun, Oct 12, 2008 at 5:01 PM, Meir Yanovich <me...@gmail.com> wrote:
>>
>>>
>>> Hello all
>>> i was using xerces c version 2.3 with my code and every thing worked
>>> right now i upgraded to version 2.7
>>> and when i compile ( windows first with vc 6 ) im getting this error :
>>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(633)
>>> : error C2059: syntax error : 'constant'
>>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(761)
>>> : error C2660: 'InnerAssert' : function does not take 5 parameters
>>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(766)
>>> : error C2660: 'InnerAssert' : function does not take 5 parameters
>>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(772)
>>> : error C2059: syntax error : 'constant'
>>>
>>> i comment must of my code including the xerces include files and found
>>> out the error comes from  the include file
>>> #include <xercesc/parsers/XercesDOMParser.hpp>
>>>
>>> can someone please tell me what im missing here ? why it doesn't compile
>>> ?
>>> Thanks allot
>>>
>>>
>>
>>
>>
>
>

Re: Compilation windows/unix failer in version 2.7

Posted by Alberto Massari <am...@datadirect.com>.
The line 633 of XSerializeEngine.hpp is

    inline void            Assert(bool  toEval
                                , const XMLExcepts::Codes toThrow)  const;

and the same Assert occurs at the other locations; so I guess you have a 
#define for an Assert macro that clashes with the method name.
Just be sure to include the Xerces headers before the header that 
contains the definition, or add a #undef Assert before the Xerces ones.

Hope this helps,
Alberto

Meir Yanovich wrote:
> Hello sorry for posting this question again . but im looking for solution
> without any success so if someone know something please please help
> again sorry for posting again .
> thanks
>
> On Sun, Oct 12, 2008 at 5:01 PM, Meir Yanovich <me...@gmail.com> wrote:
>   
>> Hello all
>> i was using xerces c version 2.3 with my code and every thing worked
>> right now i upgraded to version 2.7
>> and when i compile ( windows first with vc 6 ) im getting this error :
>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(633)
>> : error C2059: syntax error : 'constant'
>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(761)
>> : error C2660: 'InnerAssert' : function does not take 5 parameters
>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(766)
>> : error C2660: 'InnerAssert' : function does not take 5 parameters
>> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(772)
>> : error C2059: syntax error : 'constant'
>>
>> i comment must of my code including the xerces include files and found
>> out the error comes from  the include file
>> #include <xercesc/parsers/XercesDOMParser.hpp>
>>
>> can someone please tell me what im missing here ? why it doesn't compile ?
>> Thanks allot
>>
>>     
>
>
>   


Re: Compilation windows/unix failer in version 2.7

Posted by Meir Yanovich <me...@gmail.com>.
Hello sorry for posting this question again . but im looking for solution
without any success so if someone know something please please help
again sorry for posting again .
thanks

On Sun, Oct 12, 2008 at 5:01 PM, Meir Yanovich <me...@gmail.com> wrote:
> Hello all
> i was using xerces c version 2.3 with my code and every thing worked
> right now i upgraded to version 2.7
> and when i compile ( windows first with vc 6 ) im getting this error :
> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(633)
> : error C2059: syntax error : 'constant'
> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(761)
> : error C2660: 'InnerAssert' : function does not take 5 parameters
> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(766)
> : error C2660: 'InnerAssert' : function does not take 5 parameters
> \xerces-c-2.7.0-win32\include\xercesc\internal\xserializeengine.hpp(772)
> : error C2059: syntax error : 'constant'
>
> i comment must of my code including the xerces include files and found
> out the error comes from  the include file
> #include <xercesc/parsers/XercesDOMParser.hpp>
>
> can someone please tell me what im missing here ? why it doesn't compile ?
> Thanks allot
>