The important part is the generate=no for the included typesystems.
Note that the typesystems are embedded with qrc, so adressing them with : is inside the ressource system, not
the filesystem, which is why :../../sometypesystem.txt can not work.
For morre details, lookup the QtJambi example in the QtJambi Git repository, there is a generator_example which should work more or less with the pythonqt generator.
regards,
Florian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi I'm trying to generate some code with the pythonqt_generator (I've got everything compiled)
and well when I have a pretty barebones typesystem file
after it prints out the file name of the last header file then it segfaults
when i try to include this
I get the message
A minimal example that I did was:
pythonqt_generator -include-paths="some include paths to find dependend files" -output-directory=. yourincludes.h typesystem_test.txt
(include paths are useful if you include things from somewhere else)
where the typesystem looks like this:
<typesystem package="de.pythonqt.test" default-superclass="com.trolltech.qt.QtJambiObject">
<load-typesystem name=":/trolltech/generator/typesystem_core.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_gui.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_sql.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_opengl.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_svg.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_network.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_xml.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_xmlpatterns.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_webkit.txt" generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_phonon.txt" generate="no" />
<object-type name="SomeObject" />
</typesystem>
The important part is the generate=no for the included typesystems.
Note that the typesystems are embedded with qrc, so adressing them with : is inside the ressource system, not
the filesystem, which is why :../../sometypesystem.txt can not work.
For morre details, lookup the QtJambi example in the QtJambi Git repository, there is a generator_example which should work more or less with the pythonqt generator.
regards,
Florian
Thank's I'll try that
It still just segfaults after it's parsed the header files I've tried including several different includes but can't seem to get it to work
Did you try a minimal version?
Just define some class in your header and try to wrap that for a start.
Ah and segfault means you could have a look using gdb, 8-)
gdb output without debuging symbols
OK ran it on one header file seems to work but It's not generating any thing perhaps I had to many headers in it at once
thanks for you help
The parser is not really perfect, it was mainly crafted for Qt wrapping, so it might stumble on some constructs.
One thing where it failed on me was a
#define SOMEFILE "somefile.h"
#include SOMEFILE
where I had to expand the macro.
I did not modify the parser at all, it is original QtJambi code…