如何组织我的 C++ 的 Windows 和 Android 版本游戏?

发布于 2024-11-01 21:59:39 字数 373 浏览 2 评论 0原文

我想开发 Android 游戏的 Windows 版本以用于测试和演示目的。我的大部分代码是 C++,使用 OpenGL 进行渲染,并使用一个薄的 Android/Java 层转发触摸事件并加载资源。

我的第一个想法是为我的 Windows 版本制作一个 Visual Studio 项目,因为我很熟悉它并且调试器非常出色。

我可以使用 Eclipse 和 Eclipse 获得类似的 C++ 调试功能吗? CDT?让所有版本都在同一个 IDE 上运行似乎更整洁,并且减少对专有软件的依赖会很好。我是否能够在 CDT 中添加 Windows 构建配置、切换并启动 IDE?而是调试我的 Windows 版本?或者我会进入一个痛苦的世界吗?

还有其他我没有考虑过的方法吗?欢迎所有建议!

I would like to develop a Windows build of my Android game for testing and demo purposes. Most of my code is C++, using OpenGL to render, with a thin Android/Java layer that forwards touch events and loads resources.

My first thought was to make a Visual Studio project for my Windows version, as I'm familiar with it and the debugger is excellent.

Can I get similar C++ debugging functionality with Eclipse & CDT? It seems tidier to have all versions working from the same IDE, and it would be nice to become less dependant on proprietary software. Would I be able to add a Windows build configuration in CDT, switch over, and have the IDE launch & debug my Windows version instead? Or would I be entering a world of pain setting this up?

Are there any other approaches I haven't considered? All advice welcome!

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

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

发布评论

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

评论(4

萌能量女王 2024-11-08 21:59:39

CDT是一个非常好的Windows开发环境。只需确保您已安装 Windows SDK

如果担心 Visual Studio 为您放置了大量特定于 Windows 的代码,您可能会考虑在其中启动一个新项目。我会避免 MFC。只需创建一个新的 Win32 项目即可。然后,您可以获取该代码并将其用作 Eclipse 项目的基础,并合并来自原始 Android 游戏的独立于平台的代码。

CDT is a perfectly good Windows development environment. Just make sure that you have installed the Windows SDK.

If the concern is that Visual Studio puts a lot of the Windows-specific code in place for you, you might consider starting a new project in it. I'd avoid MFC. Just create a new Win32 project. Then, you could take that code and use it as the basis for your Eclipse project, folding in the platform-independent code from your original Android game.

梦行七里 2024-11-08 21:59:39

您可以使用 makefile 轻松提出跨 IDE 解决方案。我想 cmake 可以在这里帮助你。

You can easily come up with a cross-IDE solution using makefiles. I guess cmake could help you here.

风和你 2024-11-08 21:59:39

您可以尝试MPC。它可以生成 VS 解决方案或 Eclipse CDT 项目(等等)。我在之前的工作中一直在使用它,一旦你掌握了它的窍门,它就会非常好用(这应该不会很难)。我不确定它在一个
交叉编译环境,因为我们使用它在 Linux/Windows 的 PC 上构建我们的项目。

You could try out MPC. It can generate VS solutions or Eclipse CDT projects(and some more). I've been using it at my previous job and it's really neat once you get the hang of it(which shouldn't be very hard). I'm not sure how well does it work in a
cross-compilation environment, as we were using it to build our project on PC for Linux/Windows.

优雅的叶子 2024-11-08 21:59:39

您没有理由不能在 WIndows 上使用 Eclipse。

据我所知(我还没有那么多地使用 Eclipse 进行 C++),Visual Studio 仍然拥有最好的调试器。 (使用多个编译器进行编译也可以是一种很好的代码健康检查)。所以选择 VS 也可能有理由。

如果您确实决定使用 VS for Windows 版本,您可能需要研究 CMake 来管理构建系统,因为它可以生成 Visual Studio 解决方案以及 makefile 以及您可能需要构建的几乎任何其他内容。

There's no reason why you shouldn't be able to use Eclipse on WIndows as well.

As far as I know though (I haven't used Eclipse for C++ that much), Visual Studio still has the best debugger. (it can also be a good code health check to compile it with more than one compiler). So there may be reasons to go with VS as well.

If you do decide to go with VS for the Windows version, you may want to look into CMake for managing the build system, since it can generate Visual Studio solutions as well as makefiles and pretty much anything else you may need to build.

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