Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 修复包:执行时出现Qt5 SEGFULT_Macos_Qt_Cmake - Fatal编程技术网

Macos 修复包:执行时出现Qt5 SEGFULT

Macos 修复包:执行时出现Qt5 SEGFULT,macos,qt,cmake,Macos,Qt,Cmake,为了创建一个独立的Qt5应用程序,我正在测试fixup_bundle。Fixup没有给我任何错误,但在运行我的应用程序时,我得到如下结果: target_link_libraries( exe Qt5::Widgets Qt5::OpenGL ) 类RunLoopModeTracker在两个 /Users/rperrot/Prog/exe/Build/src/executables/exe/exe.app/Contents/Frameworks/QtCore.framework/Version

为了创建一个独立的Qt5应用程序,我正在测试fixup_bundle。Fixup没有给我任何错误,但在运行我的应用程序时,我得到如下结果:

target_link_libraries( exe Qt5::Widgets Qt5::OpenGL )
类RunLoopModeTracker在两个 /Users/rperrot/Prog/exe/Build/src/executables/exe/exe.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 和 /Users/rperrot/Qt/5.6/clang_64/lib/QtCore.framework/Versions/5/QtCore。 将使用其中一个。哪一个是未定义的

我理解这个问题,但在我的CMakeLists.txt中找不到解决方法

我像这样链接我的exe:

target_link_libraries( exe Qt5::Widgets Qt5::OpenGL )
然后在使用install命令时:

set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
install( CODE "
      INCLUDE(BundleUtilities)
      fixup_bundle( ${CMAKE_INSTALL_PREFIX}/exe.app \"\" \"\" )" 
      COMPONENT Runtime )
有什么建议吗