generate bindings on windows leads to pythonqt parser crash
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Hi!
Generation of the bindings works well on linux. Generation of bindings for qt 5.9.5 on windows fails with pythonqt_generator exception in parser.cpp Line 169. [msvc 2015 64bit debug]
Last Message seen is "Building model using [.preprocessed.tmp]"
The erros seems to indicate there is an error with the generated file data.
Any hint WHY this could fail or what he is missing?
Hm, do you have the correct Qt dlls in the PATH (the ones that you built the generator with)?
It might also help to unset the MSVC environment variables, especially INCLUDE or the like.
I ran the generator with 5.6 and 5.11 on msvc2015-64, so it should work in general.
Ah, maybe you need to run it from a different directory? I typically start it inside the generator directory, but don't enter the Release subdir... I don't know if that is relevant.
Tried three solutions. running from generator dir with <buildtype>\pythonqt_generator, copied it to generator directory and called it from <buildtype> dir directly.
Seems to depend on the generated file itself.
The windows/linux file of preprocessed.tmp differs (11MB/4MB), windows contains lots of msvc stuff. but ok.
Trying to get token informations in detail to see at wich token / line he fails.</buildtype></buildtype>
The compiler seems to struggle around a token from Q_OBJECT where it fails with strlen operator.
Debugging leads to normal q_object.h header line 125
123: Q_INVOKABLE explicit QObject(QObject *parent=Q_NULLPTR);
124: virtual ~QObject();
125:\n
With PARSER Error: expected token ";" found <unprintable token_name="">,</unprintable>
in memory i see 0x515F4f424A45435418e01e0000000
That is Q_OBJECT without any null termination.
If i fix the crash (simply by not adding the token to the error)
the pythonqt_generator finishes and leaves as a result: nothing
(0 header, 0 impl)....
giving up, using your provided bindings :-)