开发者

Is there a (Linux) C++ IDE that can 'construct' a project from a makefile?

开发者 https://www.devze.com 2022-12-29 00:09 出处:网络
I am working on a legacy C app which uses makefiles. I am more comfortable (and more productive) working from within an IDE, so I am looking for an IDE that can im开发者_如何学Goport the makefile and

I am working on a legacy C app which uses makefiles. I am more comfortable (and more productive) working from within an IDE, so I am looking for an IDE that can im开发者_如何学Goport the makefile and create a project.

Incidentally, these are hand written makefiles (not complicated ones like those generated by Autoconf). I am using Code::Blocks at the moment, but it seems it is unable to import makefiles ...


The last time I checked, Eclipse can import makefile projects or generate makefiles for you.


I think that most do. For a fact QTCreator and Eclipse can deal with makefile based projects appropriatedly.

In eclipse CDT (last one I have used) just create a C++ project specifying the current location of your project and tell it to use an empty makefile. That will create an Eclipse project that uses the existing makefile (untouched)


Unless you make some hard assumptions on what can and cannot happen in the make file, I doubt what you describe is even theoretically possible.


The autotools chain is quite a patchwork system -- there isn't enough structure in the toolchain for an IDE to "import" the project consitantly and correctly. However, some IDE's (e.g., eclipse and netbeans) can import them, provided the build script follow certain popular conventions.

If you want to work with code in the most robust manner (cross platform, cross IDE etc) I would find a set of tools that are designed to be portable.

So, what I am driving at is that you need a robust build system. A robust build system would compile the same code base on any OS/IDE. In order to achieve this you need to be able to specify your build needs at yet a higher level of abstraction. Tools exist to do this, and in the C/C++ world CMAKE is the popular choice. Once you have written a CMAKE description of your project you can target any IDE.


The best you can do is buildint makefile base projects. if you do it that way however YOU are responsible to keep this makefile up to date. And this can makefile is the usually way it is done in Linux IDES, the IDES generate the Makefile but the otherway generating Projects from Makefile is not supporte.

0

精彩评论

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