致命错误:OgreCgPlugin.h:没有这样的文件或目录(Ogre3d)

发布于 2024-10-20 13:47:08 字数 563 浏览 6 评论 0原文

在尝试从 Linux 源代码安装 Ogre3d 后,一切都正确构建,但我意识到我已经构建了静态库。我再次使用 CMake 重新构建,这次取消勾选静态选项。当我在 code::blocks 中创建一个新的 Ogre 项目并尝试编译时,我得到:

 __________________________________________________ ____ _________________________________________________________
| /usr/local/include/OGRE/OgreStaticPluginLoader.h | 28 | fatal error: OgreCgPlugin.h: No such file or directory |
|__________________________________________________|____|________________________________________________________|

Ogre3d 的静态和动态构建都出现此错误。请注意,创建项目后我没有更改任何设置,只是单击编译。谁能帮助我吗?

After attempting to install Ogre3d from source for Linux, it all built properly but I realized that I had built static libraries. I re-built using CMake again, this time un-ticking the static option. When I create a new Ogre Project in code::blocks and try to compile, I get:

 __________________________________________________ ____ _________________________________________________________
| /usr/local/include/OGRE/OgreStaticPluginLoader.h | 28 | fatal error: OgreCgPlugin.h: No such file or directory |
|__________________________________________________|____|________________________________________________________|

I got this error with both the static and dynamic builds of Ogre3d. Note that I did not change any settings after creating the project, just clicked compile. Can anyone help me?

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

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

发布评论

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

评论(1

铁轨上的流浪者 2024-10-27 13:47:08

听起来几乎就像是当您重新编译时(取消选中静态后),它之后并没有安装这些文件,因为在构建过程中的某个时候,它会生成一个名为 OgreBuildSettings.h 的文件来保存此信息(在本例中,它定义了 < code>OGRE_STATIC_LIB,尽管您没有选中它。)

如果您直接从 Ogre 存储库目录运行 cmake,我建议您检查 Ogre 源代码的干净副本并重建。

有一件事可能会有所帮助 - 一般来说,当我构建它时,我会遵循以下模式:

cd /path/to/ogre; mkdir 构建 && cd 构建 && cmake-gui .. &&制作&& sudo make install

这的好处是使我的构建配置与源代码分开,让我可以为动态和静态构建拥有单独的构建目录,并且(最重要的是)允许我删除构建目录并快速重新开始,万一我搞砸了一些事情。 (:

It almost sounds like when you recompiled (after unchecking static), it didn't install the files afterward, as at some time during the build process it generates a file called OgreBuildSettings.h that holds this information (in this case, it's defining OGRE_STATIC_LIB, despite the fact that you unchecked it.)

If you ran cmake directly from the Ogre repository directory, I'd recommend checking out a clean copy of the Ogre source and rebuilding.

One thing that might be helpful - generally when I'm building it, I'll follow a pattern along the lines of:

cd /path/to/ogre; mkdir build && cd build && cmake-gui .. && make && sudo make install

This has the benefit of keeping my build configuration separate from the source, lets me have separate build directories for dynamic and static builds, and (most importantly) allows me to just remove the build directory and start over quickly, in the event that I screwed something up. (:

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