<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">In pygccxml I am using -x (and -c).<div class=""><br class=""></div><div class="">See the following lines:</div><div class=""><a href="https://github.com/gccxml/pygccxml/blob/develop/pygccxml/parser/source_reader.py#L143-L146" class="">https://github.com/gccxml/pygccxml/blob/develop/pygccxml/parser/source_reader.py#L143-L146</a></div><div class=""><br class=""></div><div class="">Michka</div><div class=""><br class=""></div><div style=""><blockquote type="cite" class=""><div class="">On 30 Nov 2015, at 21:41, Yllman, Jens <<a href="mailto:jens@yllman.se" class="">jens@yllman.se</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" class="">
<div bgcolor="#FFFFFF" text="#000000" class="">
<div class="moz-cite-prefix">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.<br class="">
<br class="">
Jens<br class="">
<br class="">
On 2015-11-30 19:53, Uğur Büyükdurak wrote:<br class="">
</div>
<blockquote cite="mid:CAJM+KQ0YNnO7PWQH+VZ+hgoyri4e08VgfKs8AfJfXxtGkLVWLQ@mail.gmail.com" type="cite" class="">
<div dir="ltr" class=""><br class="">
<div class="gmail_quote">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,<br class="">
<span style="color:rgb(0,0,255)" class=""><br class="">
castxml example.h --castxml-gccxml -o example.xml<br class="">
error: '--castxml-gccxml' does not work with c11<br class="">
<br class="">
castxml example.h --castxml-gccxml -o example.xml -std=c++11<br class="">
<br class="">
error: invalid argument '-std=c++11' not allowed with
'C/ObjC'<br class="">
deneme.h:3:7: error: use of undeclared identifier 'std'<br class="">
using std::cout;<br class="">
^<br class="">
deneme.h:4:7: error: use of undeclared identifier 'std'<br class="">
using std::endl;<br class="">
^<br class="">
2 errors generated.<br class="">
<br class="">
</span><br class="">
Below is the example file I am trying to parse,<br class="">
<br class="">
<pre style="background-color: rgb(255, 255, 255); font-size: 11.3pt;" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><span style="color:rgb(128,128,128);font-style:italic" class="">//#include <iostream>
</span><span style="color:rgb(128,128,128);font-style:italic" class="">
</span><span style="color:rgb(102,14,122);font-weight:bold" class="">using </span>std::cout;
<span style="color:rgb(102,14,122);font-weight:bold" class="">using </span>std::endl;
<span style="color:rgb(102,14,122);font-weight:bold" class="">class </span>Car{
<span style="color:rgb(102,14,122);font-weight:bold" class="">private</span>:
<span style="color:rgb(0,0,128);font-weight:bold" class="">int </span>deneme;
<span style="color:rgb(0,0,128);font-weight:bold" class="">double </span>other;
<span style="color:rgb(0,0,128);font-weight:bold" class="">char </span>ahahaha;
<span style="color:rgb(102,14,122);font-weight:bold" class="">public</span>:
Car();
Car(Car && obj);
~Car();
};
</span></pre>
<pre style="background-color: rgb(255, 255, 255); font-size: 11.3pt;" class=""><span style="font-family:arial,helvetica,sans-serif" class="">But if I change the file's name from example.h to example.hpp, everything seems to work fine.
</span></pre>
<br class="">
</div>
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre wrap="" class="">_______________________________________________
CastXML mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CastXML@public.kitware.com">CastXML@public.kitware.com</a>
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/castxml">http://public.kitware.com/mailman/listinfo/castxml</a>
</pre>
</blockquote>
<br class="">
</div>
_______________________________________________<br class="">CastXML mailing list<br class=""><a href="mailto:CastXML@public.kitware.com" class="">CastXML@public.kitware.com</a><br class="">http://public.kitware.com/mailman/listinfo/castxml<br class=""></div></blockquote></div><br class=""></body></html>