Menu

Latest version in trunk (441) failed to compile

Help
Brian
2016-08-30
2016-09-07
  • Brian

    Brian - 2016-08-30

    Hi,
    I'm trying to compile latest version from trunk for python2 and I got these errors. I tried to replace the PyMapping_Items
    by PyObject_Repr, the errors were gone; however, examples kept crashing.

    C:\lib\PythonQt3.1_py2\src\PythonQtConversion.h:490: error: C2664: 'PyObject *PyObject_CallMethod(PyObject *,char *,char *,...)': cannot convert argument 2 from 'const char [6]' to 'char *'

    C:\lib\PythonQt3.1_py2\src\PythonQtConversion.cpp:954: error: C2664: 'PyObject *PyObject_CallMethod(PyObject *,char *,char *,...)': cannot convert argument 2 from 'const char [6]' to 'char *'

    Using Python3 the latest version in trunk working fine, except for Python_Launcher example keeping crashing.

    My setup:
    Windows 10 64bit v1607
    Python: 2.7.12 under Miniconda3
    Qt: 5.7 msvc14
    I've been trying to build the project using qt-creator.

    Any help would be appreciated.

     

    Last edit: Brian 2016-08-30
  • Florian Link

    Florian Link - 2016-08-30

    I think you have to relax the compiler settings to allow conversion to char pointer on the Python C api.
    alternatively you can add a const_cast to fix the places.

     
  • Brian

    Brian - 2016-08-30

    Hi Florian,
    I'm not sure how to set such options (-Zc:strictStrings-) in Qt-Creator. Can you elaborate more on this?

     

    Last edit: Brian 2016-08-30
  • Brian

    Brian - 2016-08-30

    It seems to be fine when I set to QMAKE_CXXFLAGS+= -Zc:strictStrings-
    After a while the building is successful, however, examples are still crashed. Hm...

     
  • Brian

    Brian - 2016-09-07

    After a few trying, I think it was the Miniconda3 python2 packages was the problem. I installed the distribution from python official site and there's no more crashing.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.