Error while generating xml using gccxml for QApplication

92 views
Skip to first unread message

Sharique

unread,
Jan 3, 2012, 2:07:19 PM1/3/12
to mono-cxxi
Hi,

I'm trying to generate bindings for Qt libraries.

I run this against Qapplication.h, I get these errors. Honetly
speaking I did not understand the meaning and cause of error.
=====

In file included from /usr/include/c++/4.6/bits/char_traits.h:41,
from /usr/include/c++/4.6/string:42,
from /usr/include/QtCore/qstring.h:60,
from /usr/include/QtCore/qobject.h:48,
from /usr/include/QtCore/qcoreapplication.h:45,
from /usr/include/Qt/qapplication.h:45:
/usr/include/c++/4.6/bits/stl_algobase.h: In function '_OI
std::__copy_move_a(_II, _II, _OI)':
/usr/include/c++/4.6/bits/stl_algobase.h:378: error: expected primary-
expression before ')' token
/usr/include/c++/4.6/bits/stl_algobase.h:378: error: there are no
arguments to '__is_trivial' that depend on a template parameter, so a
declaration of '__is_trivial' must be available
/usr/include/c++/4.6/bits/stl_algobase.h:378: error: (if you use '-
fpermissive', G++ will accept your code, but allowing the use of an
undeclared name is deprecated)
/usr/include/c++/4.6/bits/stl_algobase.h:383: error: '__simple' cannot
appear in a constant-expression
/usr/include/c++/4.6/bits/stl_algobase.h:384: error: template argument
2 is invalid
/usr/include/c++/4.6/bits/stl_algobase.h: In function '_BI2
std::__copy_move_backward_a(_BI1, _BI1, _BI2)':
/usr/include/c++/4.6/bits/stl_algobase.h:573: error: expected primary-
expression before ')' token
/usr/include/c++/4.6/bits/stl_algobase.h:573: error: there are no
arguments to '__is_trivial' that depend on a template parameter, so a
declaration of '__is_trivial' must be available
/usr/include/c++/4.6/bits/stl_algobase.h:578: error: '__simple' cannot
appear in a constant-expression
/usr/include/c++/4.6/bits/stl_algobase.h:579: error: template argument
2 is invalid
/usr/include/c++/4.6/bits/stl_algobase.h: In function 'typename
__gnu_cxx::__enable_if<(! std::__is_scalar<_Tp>::__value),
_OutputIterator>::__type std::__fill_n_a(_OutputIterator, _Size, const
_Tp&)':
/usr/include/c++/4.6/bits/stl_algobase.h:731: error: expected `;'
before '__niter'
/usr/include/c++/4.6/bits/stl_algobase.h:732: error: '__niter' was not
declared in this scope
/usr/include/c++/4.6/bits/stl_algobase.h: In function 'typename
__gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value,
_OutputIterator>::__type std::__fill_n_a(_OutputIterator, _Size, const
_Tp&)':
/usr/include/c++/4.6/bits/stl_algobase.h:743: error: expected `;'
before '__niter'
/usr/include/c++/4.6/bits/stl_algobase.h:744: error: '__niter' was not
declared in this scope


====
I guess this is some thing due to changes in 4.5 adn 4.6?

I'using OpenSuse 12.1. I installed gccxml from the first result from
http://software.opensuse.org

Thanks
---
Sharique

Sharique

unread,
Jan 10, 2012, 9:00:55 AM1/10/12
to mono-cxxi
Is nobody able to reproduce this error?
I checked GCC Xml site. It seems not gccxml is being actively
maintained. I also try to access cvs but anonymous login is failed.
http://www.gccxml.org/HTML/News.html

Jonx

unread,
Jan 10, 2012, 9:30:51 AM1/10/12
to mono-cxxi
Hi,
You need to provide more info about what you do and how if you want to
get some help.

What is the version of gccxml that you are using? What is the exact
command line you run?

GCC Xml is still actively maintained. Just, they don't have the time
to generate packages.
You have to get the source from CVS and build it.

I know it's working because I did it last week. I'm on windows and I
was able to build gccxml by following carefully the instructions on
their web site.

Don't use the built packages... build the source yourself. It was not
easy but it worked for me...

Start here: http://www.gccxml.org/HTML/Download.html
Then here: http://www.gccxml.org/HTML/Install.html

good luck,
John,
> maintained. I also try to access cvs but anonymous login is failed.http://www.gccxml.org/HTML/News.html

Sharique uddin Ahmed Farooqui

unread,
Jan 10, 2012, 1:34:03 PM1/10/12
to mono...@googlegroups.com
Sharique uddin Ahmed Farooqui
http://safknw.blogspot.com/
"Peace" is the Ultimate desire of mankind.

On Tue, Jan 10, 2012 at 8:00 PM, Jonx <kni...@gmail.com> wrote:
> Hi,
> You need to provide more info about what you do and how if you want to
> get some help.
>
> What is the version of gccxml that you are using? What is the exact
> command line you run?
>

I'm using package from this repo
http://download.opensuse.org/repositories/devel:/tools/openSUSE_12.1/x86_64/
The package is gccxml-0.9+r20080319-1.4.x86_64

I think package is from older release and does not contains
gccxml_builtins.h file for 4.6 version, so I' using from 4.5 folder.

The command line options are
# gccxml -I/usr/share/gccxml-0.9/GCC/4.5/
/usr/include/Qt/qapplication.h -fxml=qapplication.xml

While trying to get latest code from cvs I get request time out error.
I'm using these options to access cvs
# cvs -d :pserver:ano...@www.gccxml.org:/cvsroot/GCC_XML login

Sharique

unread,
Jan 11, 2012, 3:25:52 PM1/11/12
to mono-cxxi
Thanks. I have now downloaded latest code from gccxml cvs and
successfully build it and able to generate xml file for Qapplication.h
Now I run generator.exe for generated xml file. Here are the options
for generator and error

#mono /home/sharique/Projects/fossProjects/cxxi/bin/Debug/
generator.exe qapplication.xml --lib=QtCore

QCoreApplication.QCoreApplication
QCoreApplication.Destruct
QCoreApplication.argc
QCoreApplication.argv
QCoreApplication.setAttribute
QCoreApplication.testAttribute
QCoreApplication.setOrganizationDomain
QCoreApplication.organizationDomain
QCoreApplication.setOrganizationName
QCoreApplication.organizationName
QCoreApplication.setApplicationName
QCoreApplication.applicationName
QCoreApplication.setApplicationVersion
QCoreApplication.applicationVersion
QCoreApplication.exec
QCoreApplication.processEvents
QCoreApplication.processEvents
QCoreApplication.exit
QCoreApplication.postEvent
QCoreApplication.postEvent
QCoreApplication.sendPostedEvents
QCoreApplication.removePostedEvents
QCoreApplication.removePostedEvents
QCoreApplication.hasPendingEvents
QCoreApplication.notify
QCoreApplication.startingUp
QCoreApplication.closingDown
QCoreApplication.applicationDirPath
QCoreApplication.applicationFilePath
QCoreApplication.applicationPid
QCoreApplication.addLibraryPath
QCoreApplication.removeLibraryPath
QCoreApplication.translate
QCoreApplication.translate
QCoreApplication.flush
QCoreApplication.watchUnixSignal
QCoreApplication.filterEvent
QCoreApplication.quit
QCoreApplication.aboutToQuit
QCoreApplication.unixSignal
QCoreApplication.compressEvent
QChildEvent.QChildEvent
QChildEvent.Destruct
QEventLoop.QEventLoop
QEventLoop.Destruct
QEventLoop.processEvents
QEventLoop.processEvents
QEventLoop.exec
QEventLoop.exit
QEventLoop.isRunning
QEventLoop.wakeUp
QEventLoop.quit
QInternal.activateCallbacks
QInternal.callFunction
QList<QObject*>.clear
QList<QObject*>.reserve
QList<QObject*>.append
QList<QObject*>.removeAll
QList<QObject*>.removeOne
QList<QObject*>.indexOf
QList<QObject*>.lastIndexOf
QList<QObject*>.contains
QList<QObject*>.count
QList<QObject*>.mid
QList<QObject*>.value
QList<QObject*>.value

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.basic_string

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.basic_string

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.basic_string

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.basic_string

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.reserve

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.append

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.append

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.assign

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.erase

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.swap

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.compare

basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
>.compare
QObject.metaObject
QObject.qt_metacast
QObject.qt_metacall
QObject.QObject
QObject.Destruct
QObject.event
QObject.eventFilter
QObject.objectName
QObject.setObjectName
QObject.blockSignals
QObject.startTimer
QObject.killTimer
QObject.setParent
QObject.installEventFilter
QObject.removeEventFilter
QObject.connect
QObject.disconnect
QObject.dumpObjectTree
QObject.dumpObjectInfo
QObject.registerUserData
QObject.setUserData
QObject.userData
QObject.destroyed
QObject.deleteLater
QObject.sender
QObject.receivers
QObject.timerEvent
QObject.childEvent
QObject.customEvent
QObject.connectNotify
QObject.disconnectNotify

Unhandled Exception: System.NotImplementedException: The requested
feature is not implemented.
at Generator.GetType (.Node n, CppType modifiers) [0x00000] in
<filename unknown>:0
at Generator.GetType (.Node n) [0x00000] in <filename unknown>:0
at Generator.CreateMembers () [0x00000] in <filename unknown>:0
at Generator.Run (System.String[] args) [0x00000] in <filename
unknown>:0
at Generator.Main (System.String[] args) [0x00000] in <filename
unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NotImplementedException: The
requested feature is not implemented.
at Generator.GetType (.Node n, CppType modifiers) [0x00000] in
<filename unknown>:0
at Generator.GetType (.Node n) [0x00000] in <filename unknown>:0
at Generator.CreateMembers () [0x00000] in <filename unknown>:0
at Generator.Run (System.String[] args) [0x00000] in <filename
unknown>:0
at Generator.Main (System.String[] args) [0x00000] in <filename
unknown>:0
--
Sharique

On Jan 10, 11:34 pm, Sharique uddin Ahmed Farooqui <saf...@gmail.com>
wrote:
> Sharique uddin Ahmed Farooquihttp://safknw.blogspot.com/
> "Peace" is the Ultimate desire of mankind.
>
> On Tue, Jan 10, 2012 at 8:00 PM, Jonx <kni...@gmail.com> wrote:
> > Hi,
> > You need to provide more info about what you do and how if you want to
> > get some help.
>
> > What is the version of gccxml that you are using? What is the exact
> > command line you run?
>
> I'm using package from this repohttp://download.opensuse.org/repositories/devel:/tools/openSUSE_12.1/...
> The package is gccxml-0.9+r20080319-1.4.x86_64
>
> I think package is from older release and does not contains
> gccxml_builtins.h file for 4.6 version, so I' using from 4.5 folder.
>
> The command line options are
> # gccxml  -I/usr/share/gccxml-0.9/GCC/4.5/
> /usr/include/Qt/qapplication.h -fxml=qapplication.xml
>
> While trying to get latest code from cvs I get request time out error.
> I'm using these options to access cvs
> # cvs -d :pserver:anon...@www.gccxml.org:/cvsroot/GCC_XMLlogin

Jonx

unread,
Jan 11, 2012, 4:32:43 PM1/11/12
to mono-cxxi
Good that you got the latest...

Would you post the XML here for me so that I can take a look at it?
It simply seems to be a type not yet handled by the generator...
> ...
>
> read more »

Sharique uddin Ahmed Farooqui

unread,
Jan 12, 2012, 5:41:54 AM1/12/12
to mono...@googlegroups.com, kni...@gmail.com
Sharique uddin Ahmed Farooqui

http://safknw.blogspot.com/
"Peace" is the Ultimate desire of mankind.

On Thu, Jan 12, 2012 at 3:02 AM, Jonx <kni...@gmail.com> wrote:
> Good that you got the latest...
>
> Would you post the XML here for me so that I can take a look at it?
> It simply seems to be a type not yet handled by the generator...
>

I have attached the xml file. It is too big to paste here. I'm not
sure Google groups allow attachments.

qapplication.tar.7z

Jonx

unread,
Jan 12, 2012, 6:16:21 AM1/12/12
to mono-cxxi
Ok, I tested your file and like I said... What happens is that one of
your types is not yet supported by the generator...

case "CvQualifiedType":
if (n.IsTrue ("const"))
return GetType (GetTypeNode (n), modifiers.Modify
(CppModifiers.Const));
else
throw new NotImplementedException (); // here

it seems to be the use of generics that is causing some troubles. all
the types like "QTypeInfo<QSizeF>"
not sure thus said, someone of the autors will have to confirm this...

You can try to find your way around and implement what is needed.

You could try to comment out that line but then you will get some
other problems when the generator tries to write the classes.

Sorry I do not know how to deal with that issue. Someone of the team
has to step up...

John.

On Jan 12, 11:41 am, Sharique uddin Ahmed Farooqui <saf...@gmail.com>
wrote:
> Sharique uddin Ahmed Farooquihttp://safknw.blogspot.com/
> "Peace" is the Ultimate desire of mankind.
>
> ...
>
> read more »
>
>  qapplication.tar.7z
> 237KViewDownload
Reply all
Reply to author
Forward
0 new messages