[CastXML] Fwd: Output castxml

Michka Popoff michkapopoff at gmail.com
Mon Nov 30 17:45:46 EST 2015


In pygccxml I am using -x (and -c).

See the following lines:
https://github.com/gccxml/pygccxml/blob/develop/pygccxml/parser/source_reader.py#L143-L146 <https://github.com/gccxml/pygccxml/blob/develop/pygccxml/parser/source_reader.py#L143-L146>

Michka

> On 30 Nov 2015, at 21:41, Yllman, Jens <jens at yllman.se> wrote:
> 
> The -std=c++11 does not really tell what type of file it is. Only that if it is C++ it should be treated as C++11. In GCC you use -x c++ to tell that the source is C++. I do not know if the castxml-wrapper or gccxml will accept that option.
> 
> Jens
> 
> On 2015-11-30 19:53, Uğur Büyükdurak wrote:
>> 
>> Okay I now understand what causes the strange behaviour. It is NOT the gccxml wrapper, instead it is just the file name extension. Below are the examples,
>> 
>> castxml example.h --castxml-gccxml -o example.xml
>> error: '--castxml-gccxml' does not work with c11
>> 
>> castxml example.h --castxml-gccxml -o example.xml -std=c++11
>> 
>> error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
>> deneme.h:3:7: error: use of undeclared identifier 'std'
>> using std::cout;
>>       ^
>> deneme.h:4:7: error: use of undeclared identifier 'std'
>> using std::endl;
>>       ^
>> 2 errors generated.
>> 
>> 
>> Below is the example file I am trying to parse,
>> 
>> //#include <iostream>
>> 
>> using std::cout;
>> using std::endl;
>> 
>> class Car{
>> private:
>>     int deneme;
>>     double other;
>>     char ahahaha;
>> 
>> public:
>>     Car();
>>     Car(Car && obj);
>>     ~Car();
>> 
>> };
>> 
>> But if I change the file's name from example.h to example.hpp, everything seems to work fine.
>> 
>> 
>> 
>> _______________________________________________
>> CastXML mailing list
>> CastXML at public.kitware.com <mailto:CastXML at public.kitware.com>
>> http://public.kitware.com/mailman/listinfo/castxml <http://public.kitware.com/mailman/listinfo/castxml>
> 
> _______________________________________________
> CastXML mailing list
> CastXML at public.kitware.com
> http://public.kitware.com/mailman/listinfo/castxml

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/castxml/attachments/20151130/39e75beb/attachment.html>


More information about the CastXML mailing list