I cannot build Pythonqt

This is PythonQt: pythonqt.sourceforge.net. I am using PythonQt-1.1. Qt version 4.6.2 and Python 2.6.4.10. Visual Studio 2008 From the instructions:

cd PythonQtRoot  
vcvars32  
qmake  
nmake

      

after I typed qmake, it generated a makefile, then I typed nmake, but it said: "makefile (22): fatal error U1000: syntax error:") "is missing from the call to Stop macros". What did I do wrong here?

Thanks in advance....

+2


a source to share


3 answers


I remember having similar issues when building other packages with recent Qt releases on Win32. By the way, I'm running under the kigvin. After a fair amount of debugging, I found that "qmake" was using the wrong "mkspec". One thing that helped this situation was to force the correct mkspec to be used, for example:

export QMAKESPEC = win32-msvc2008 or export QMAKESPEC = win32-msvc

To find a list of all valid mkspecs I looked in the directory: C: \ Qt \ 4.6.0 \ mkspecs or C: \ Qt \ 2010.01 \ Qt \ mkspecs



For one particular package, I had some conflicts with other tools installed on my system and had to edit the actual mkspec file to point to the correct tool using the absolute path, but that doesn't seem to be your problem. It looks like yours is generating a gmake-compatible Makefile instead of an nmake-compatible Makefile, so this fix should work.

- Glenn

0


a source


My suggestion is to include the PythonQt project as part of your very project with CMake.

Then you just need to create it as part of your project statically (remove SHARED from add_library

in the base CMakeLists.txt

, remembering that if you want it to be like this, you need to remove it project(PythonQt)

from its base CMakeLists.txt

, and then add the CMakeLists.txt

following to your own base file :



if( PYTHON_QT_SUPPORT )
    message(STATUS ":::: Including support for PythonQT Shell ::::")
    # Include Python directories
    find_package(PythonLibs REQUIRED)
    include_directories("${PYTHON_INCLUDE_DIR}")
    # Include PythonQt 
    include_directories(YOURPATHTOPYTHONQT/pythonqt/src)
    add_subdirectory(YOURPATHTOPYTHONQT/pythonqt)
endif(PYTHON_QT_SUPPORT)

      

0


a source


Have you updated the Python / Qt versions in your build folder and included everything you need in your environment?

In build \ python.prf: update python version

Use Visual Studio Command Prompt and skip vcvars32.

set your environment paths:

set PATH=E:\toolkits\Trolltech\Qt-4.8.6\Win_x64_6.1_v12_debug\lib;%PATH%
set PATH=E:\toolkits\Trolltech\Qt-4.8.6\Win_x64_6.1_v12_debug\bin;%PATH%
set PYTHON_PATH=E:\toolkits\Python\2.7.9\Win_x64_6.1_v12
set PYTHON_LIB=E:\toolkits\Python\2.7.9\Win_x64_6.1_v12\libs

      

In these paths, you should have access:

  • all qt libraries (QtCore4.dll, etc.)
  • all qt executables (uic, moc, etc.)
  • python26.dll, python.exe

I also had to update the other .prf files to make sure the debug extensions were executed correctly when I bind to debug dlls.

0


a source







All Articles