开发者

Cross platform build system with IDE? [closed]

开发者 https://www.devze.com 2023-04-09 23:43 出处:网络
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

I've been searching since around a year for a combination of C++ build system and IDE which brings the following features:

  1. Cross plattform build system that builds atleast on Windows, Linux and Mac OS.
  2. Some sort of inteligent code completion (IntelliSense of Visual Studio, that thing fromEclipse).
  3. Debugger integrated inside the IDE (starting debugging, setting breakpoints in the code, ...).
  4. No need to restart programms all over开发者_StackOverflow社区 to build, or edit code.

It doesn't matter for me on which operating system the IDE runs, only important aspect is that there is a way to build on other plattforms (possibly without requiring that IDE). The closest I got to these was a combination of CMake + VisualStudio. Problem with that is, that every time you want to adjust your build process (add or delete a file) you have to restart VisualStudio and reconfigure all settings, CMake won't set for you.


The Qt framework uses Qmake - it has a cross platform ide QtCreator that uses the qmake .pro files.

There is also a plugin for visual studio that will convert .pro to and from visual studio projects


Codeblocks also has a cross-platform build system.

Codeblocks builds itself through its Codeblocks project file.


I have investigated a solution like the one you are looking for and haven't found anything satisfactory. I'm currently maintaining separate project files for each of my platforms (Visual Studio, XCode for OSX and iOS, makefiles for Linux, Android and webOS). I have found that it isn't a lot of work to keep them in sync, so I don't mind.

But in any case, here are a couple of ideas that I think are the most promising to achieve what you want:

  1. I think the CMake solution that you are using is the best, but it is true that each time you regenerate your project custom settings are lost. You may want to generate a patch file with all your settings, so that you can reapply those changes after running CMake to update your projects. This should work for settings stored in text files, so it works for .sln, .vcxproj, vcxproj.filters and vcxproj.user files.

  2. You may have some luck with Eclipse or Netbeans. Both are cross-platform IDEs that will allow you to work with a single project file on multiple platforms. If you have your project under source control, then you can commit the project files from your main platform, and then on other platforms you just check out the projects and make the necessary changes to the settings (directories, etc.). You just need to remember to always commit changes to the projects from the main platform, and on the other ones the local changes will stay only in your local source tree.

Option #2 above is decent, but not an option for me, as I have developed an addiction to the VS debugger, it is so much better than anything else that I would not consider any setup that does not include it.

Good luck!


Here is what I ended up doing:

  • I stuck to CMake over qmake, since it simply seems more powerful, and is easy to install seperatly. Also both only generate Makefiles so they pretty much do the same for me.
  • Since the Eclipse/VisualStudio project files created by CMake are only there for building I couldn't use them (running/debugging inside of IDE is not possible). Now I'm creating standard Makefiles and then build these with a hand mantainend Eclipse Project.
  • I added a filesystem link to my source directory and code completion and debugging are working.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号