致命错误:QtCore / private / qglobal_p.h:没有这样的文件或目录

时间:2018-07-24 06:03:30

标签: qt ubuntu-16.04 pythonqt

在构建PythonQt3.2(Ubuntu 16.04.3)时,我遇到此错误:

  

严重错误:QtCore / private / qglobal_p.h:没有此类文件或目录

/usr/include/private/qmetaobjectbuilder_p.h调用的

。我可以通过设置此库的绝对路径来解决调整#include的特定问题,但另一个库也会出现相同的问题。并非所有这些都可以通过地址的硬编码更改来解决。这是我的python.prf的样子:

# profile to include and link Python

# Change this variable to your python version (2.6, 2.7, 3.3, ...)
win32:PYTHON_VERSION=27
unix:PYTHON_VERSION=2.7

macx {
  # for macx you need to have the Python development kit installed as framework
  INCLUDEPATH += /System/Library/Frameworks/Python.framework/Headers
  LIBS += -F/System/Library/Frameworks -framework Python
} else:win32 {
  # for windows install a Python development kit or build Python yourself from the sources
  # Make sure that you set the environment variable PYTHON_PATH to point to your
  # python installation (or the python sources/header files when building from source).
  # Make sure that you set the environment variable PYTHON_LIB to point to
  # the directory where the python libs are located.
  #
  # When using the prebuild Python installer, this will be:
  # set PYTHON_PATH = c:\Python26
  # set PYTHON_LIB  = c:\Python26\libs
  #
  # When using the python sources, this will be something like:
  # set PYTHON_PATH = c:\yourDir\Python-2.6.1\
  # set PYTHON_LIB  = c:\yourDir\Python-2.6.1\PCbuild8\Win32

  # check if debug or release
  CONFIG(debug, debug|release) {
    DEBUG_EXT = _d 
  } else {
    DEBUG_EXT = 
  }

  win32:INCLUDEPATH += $$(PYTHON_PATH)/PC $$(PYTHON_PATH)/include
  win32:LIBS += $$(PYTHON_LIB)/python$${PYTHON_VERSION}$${DEBUG_EXT}.lib
} else:unix {
  # on linux, python-config is used to autodetect Python.
  # make sure that you have installed a matching python-dev package.
  #include(../../../python.pri)
  unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)
  unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes) 
}

非常感谢

0 个答案:

没有答案