cmake 非常令人沮丧的问题

发布于 2024-10-24 09:17:52 字数 1013 浏览 5 评论 0原文

我在 Windows 上使用 cmake 时遇到了令人沮丧的问题。我已经安装了 kde 库。

当我尝试使用 cmake 编译我的项目时。这一次又一次地爆发。

 Found Qt-Version 4.7.0 (using C:/Qt/2010.05/qt/bin/qmake.exe)
    CMake Error at c:/Program Files/KDE/share/apps/cmake/modules/FindPackageHandleStandardArgs.cmake:198 (MESSAGE):
      Did not find automoc4 (Automoc4Config.cmake, part of kdesupport).
      (missing: AUTOMOC4_EXECUTABLE)
    Call Stack (most recent call first):
      c:/Program Files/KDE/share/apps/cmake/modules/FindAutomoc4.cmake:56 (find_package_handle_standard_args)
      c:/Program Files/KDE/share/apps/cmake/modules/FindKDE4Internal.cmake:402 (find_package)
      C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindKDE4.cmake:95 (FIND_PACKAGE)
      CMakeLists.txt:96 (find_package)


    Configuring incomplete, errors occurred!

好吧,我正在网上挖掘这个问题。我得到了默认 kde-win-installer 缺少的 automoc4 文件。所以我下载了文件并为 automoc4 运行 cmake 并获得了 automoc4.exe,我将其放置在 %KDE_INSTALL%/bin 文件夹中。但幸运没有降临在我身上。我最喜欢的错误再次出现。

帮我解决这个问题!!

I am having a frustrating problem with cmake on windows. i have the kde libs installed.

when i am trying to compile my project with cmake . this shoots up again and again.

 Found Qt-Version 4.7.0 (using C:/Qt/2010.05/qt/bin/qmake.exe)
    CMake Error at c:/Program Files/KDE/share/apps/cmake/modules/FindPackageHandleStandardArgs.cmake:198 (MESSAGE):
      Did not find automoc4 (Automoc4Config.cmake, part of kdesupport).
      (missing: AUTOMOC4_EXECUTABLE)
    Call Stack (most recent call first):
      c:/Program Files/KDE/share/apps/cmake/modules/FindAutomoc4.cmake:56 (find_package_handle_standard_args)
      c:/Program Files/KDE/share/apps/cmake/modules/FindKDE4Internal.cmake:402 (find_package)
      C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindKDE4.cmake:95 (FIND_PACKAGE)
      CMakeLists.txt:96 (find_package)


    Configuring incomplete, errors occurred!

Well i was digging around the net for this problem. and i got the automoc4 file which were missing with the default kde-win-installer. So i downloaded the files and ran cmake for the automoc4 and got the automoc4.exe which i place in the %KDE_INSTALL%/bin folder. But luck was not with me. And again my favorite error fires up.

Help me on this!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ぃ双果 2024-10-31 09:17:52

问题已解决 感谢 patrick 和 kde-windows 团队

这个 url

然后打开 cmake-gui 选择浏览源到下载的文件夹,并将源构建到某个文件夹。

生成 cmake ,打开 cmd 并导航到构建文件夹并输入 mingw-make。

然后你得到automoc4.exe。
1. 将其放在%KDE_INSTALL%\bin 中。
2. 然后将 Automoc4Config.cmake、Automoc4.files.in 和 Automoc4Version.cmake 放在 %KDE_INSTALL%\lib\automoc4 中。

现在就试试吧。

Problem solved thanks to patrick and the kde-windows team

download the following files from this url

then open cmake-gui select the browse source to the downloaded folder, and build source to some folder.

generate the cmake , open cmd and navigate to the build folder and type mingw-make.

U then get the automoc4.exe.
1. place it in the %KDE_INSTALL%\bin.
2. Then place Automoc4Config.cmake,Automoc4.files.in and Automoc4Version.cmake in %KDE_INSTALL%\lib\automoc4.

Now just try now.

关于从前 2024-10-31 09:17:52

据我所知,CMake 似乎无法找到 automoc4。

为了让 CMake 找到可执行文件,请将 %KDE_INSTALL%/bin 文件夹添加到 PATH 环境变量中。不过,可能有更好的方法来解决这个问题。

也许您应该看一下 Automoc4Confid.cmake 看看它在哪里寻找该东西。您应该在 CMake 文件夹下的 modules 文件夹中找到它

From what I can see, it seems that CMake is unable to find automoc4.

For CMake to find the excecutable, add the %KDE_INSTALL%/bin folder to the PATH environment variable. There might be a better way to fix this though.

Maybe you should take a look at Automoc4Confid.cmake to see where it looks for the thing. You should find that in the modules folder under the CMake folder

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文