Geany vs Eclipse for C development on large projects - c

I'm trying to find an IDE for C that will give me the same level of comfort I got used to from programming in Java. I heard good things about Geany (from related questions here on Stack Overflow), and am familiar with Eclipse from my work with Java, and I was wondering which would be better suited for Linux development (kernel space stuff).
In particular I'm interested in an objective opinion of which one has a better (straightforward) integration with the terminal, and which one gets the closest to IDE features for OO languages like Java with the minimal amount of hassle. Any other relevant comparisons will be welcomed of course.

Use the Eclipse, Luke...
I supposed that I'd never give such advice, but Eclipse with CDT is a very good IDE, one of the most advanced. You should understand that Geany is only a text editor with some IDE features. And Eclipse is an IDE, yes - not so lightware like Geany, but it has lots of truly IDE features: refactoring, code analysis, error detection, and in-code hints. Also, it has easy integration with many popular profilers.
Simply try CDT - you'll like it.

The real question is: How much do you want your IDE to do for you? Eclipse will do much more than Geany, which can make you more productive, or can make it more fragile.
Eclipse will impose its own project structure, including putting metadata files in your directories. It will also require that it be able to successfully build your project(s) before many of its features will work, so you need to make sure that it can find all of your dependencies, etc. Basically, it may take more time & effort to get started. However, it has a ton of features.
Geany is much less intrusive, much faster startup, with excellent text-editing abilities - perhaps better text-editing than Eclipse - but a more modest set of programming tools. It works well when you want your builds to be external, eg launching 'make' or Maven.
I use Eclipse for launching automated tests, and for interactions with SVN (Geany has a plugin for Version Control integration, but it's limited & seems to be buggy). For most things, I prefer Geany.

I personally like Geany because it is so lightweight. But as Evgeny points out it is not a fully fledged IDE. Its built in terminal is a standard Linux shell (sh, no fancy bash here). If you don't need all the advanced features of Eclipse, Geany might be possible alternative, but if not, go with Eclipse.

Related

What are some choices to port existing Windows GUI app written in C to Linux?

I've been tasked with porting an existing Windows GUI app to Linux. Ideally, I'd like to do this so the same code base can be used to build either the Windows version or the Linux version. I'll be doing my work on Ubuntu 9.04. After searching around, it's unclear to me what tools are best suited to help me with this.
A list of loose requirements would be:
The code is in C, not C++, and should compile to build both Windows and Linux versions. Since it's existing code, and fairly large, converting to a managed language like .NET is out of the question for now.
I would prefer if I can use the same dialogs in both systems. In Windows, putting up a dialog is pretty simple. You build the dialog in the Resource Editor in Visual Studio, then call DialogBox() API, and handle the event messages. I would really like to find something that can do the equivalent on the Linux side.
It would also be nice to have a good IDE similar to Visual Studio.
Any helps or hints would be appreciated.
Thanks,
Winelib should let you compile Win32 code under Linux with only a few modifications.
Since your code base is in C, I'd suggest using GTK+. It's a cross platform GUI toolkit. For instance, Pidgin instant messenger GUI is created with GTK+. Glade user interface designer can be used to graphically design UIs.
If you're on a tight budget, and don't mind taking time to work around a fair number of limitations, Winlib is an option. If you're shorter on time, and have a larger budget, you might want to look into Mainsoft instead. It's not exactly perfect, but I believe it supports a considerably larger part of the Win32 API (at a correspondingly higher price).

Using Eclipse for C programming?

I want to examine and modify some open source programs written in C.
Is it sensible to use Eclipse for this purpose? If so, what plugins should I add? What "gotchas" should I be aware of?
If not, what FOSS C IDEs do you recommend for coding C on a linux box? Emacs, while undeniably powerful, is not to my taste (I'm more a mouser than a keyboarder.)
I have found netbeans to be a better ide for C/C++ then eclipse -- C/C++ is a first class citizen in the netbeans world. I am personally using geany these days.
Use Eclipse CDT, you can download Eclipse IDE for C/C++ here . Its not as mature as the Java IDE, and it can be a pain to set up a proper build system with it unless you're happy letting Eclipse handle your builds.
As you asked for alternative open source IDEs, I would recommend Code::Blocks for anything C/C++.
If you want to give it a try, download a nightly build (they don't really keep the "stable" version up-to-date). You can find instructions for installing on Linux in the respective forum thread.
IMO Code::Blocks is really nice because it's fast, portable and you can configure every detail of your project easily. There are also lots of plugins that can help you with development.
But if you're accustomed to Eclipse and like it so far, you should really use CDT because you get the same (nice) look-and-feel as with the other Eclipse development environments (Java, Java EE, Jython, Python, ...).

IDE for embedded development

I do a lot of embedded development work in C. I'm looking for an IDE that can give me the same kind of features as Eclipse or Visual Studio. In the past I've used Vim, but I'm just not happy with the amount of work it is to use. Right now I'm trying to use Eclipse, but I can't get it to tag my code correctly. I also have access to Visual Studio and I might be able to get a SlickEdit license.
Can anyone recommend an editor? I'm looking for something that has
Some type of code completion
SVN support
Indexing/tagging of variable, function names etc
Support for interpreting code that may be #ifed out
Third party compiler support
Is there a way to generate tags on the code without having a make file or building the code with gcc?
I think you are going in the right direction (with Eclipse).
I think your question is why you can't tag you code,
however I know that Eclipse supports ctags (so it is not in any way impossible).
Eclipse is used as the basis for Embedded development IDEs from QNX Software Systems (who are also the primary contributors to the CDT), WindRiver, Mentor Graphic, and others, so it has some weight behind it. Green-Hills have an Eclipse plug-in for their toolchain.
Getting a seamless development environment from integrating your own tools is hard work however, but more viable than with other Text Editors because of the open plug-in architecture. It depends on the level of integration you want. Edit and build are straight-forward in most editors. Getting all of, edit, build, build/dependency-management (makefile generation), version control, source browsing and remote source level debug, is a bit of a task outside of an off-the-shelf suite from someone like one of the above vendors.
Many of the proprietary non-Eclipse based IDE's from the likes of Keil or IAR are looking a little old fashioned, and are seldom satisfactory as editors, although they often offer a lot of low level functionality in terms of target hardware and RTOS awareness and simulation.
I widely used Code::Blocks
code::blocks
This thing is so amazing,
If you have any binutils arm-elf, avr-elf, VC, mingw, installed You could use whatever you want, just chose toolset in properties of project, add some libraries etc...
I've used to add other tools like flash2000 for LPC processors, objdump etc. as an external command.
There are plenty of tools for this IDE which makes your cross compilation faster & easier.
And it's much better (read faster, smaller) than Eclipse + CDT and other stuff.
http://mbeddr.com/
Just released an IDE for embedded systems
I think if the question is about the choice of IDE, then the answer is Eclipse with CDT. Seasoned guys like the author of "TDD with Embedded C", James Grenning likes and uses it. See appendix of the mentioned book for more.
I have been working on embedded products for quite some time, mostly I use emacs with ctags (etags) and cscope. I have, of late, started using SlickEdit, it works just fine. However, I personally recommend you to get familiar with Vim/Emacs whatever editor you feel comfortable. The best thing about emacs/vim is that the flexibility to extend the functionality through plugin / whatever you call it. There are lot of third party plugins available to extend these editors. Of course, you need to invest some time to get started.
I'm currently using IAR's Workbench which is nice enough. I've used Eclipse with the CDT plug-in before (and probably will again at some point) and its code navigation worked just fine. I don't recall having to futz around too much to get it to index the code, but I was using GCC (which might be a factor) and I do recall having to restart Eclipse and/or manually tell it to reindex at times when it would seem to have some trouble navigating.
However, even though IAR's Workbench works well enough for most things, when I really want to have nice code navigation at my fingertips, I just load up Visual Studio with a makefile project that includes the source tree. The makefile commands simply call out to IAR's command line utilities to perform the build. This works fantastically well except for the debugging - I have to go to IAR Workbench for that. And when I'm in a debugging mode it's just easier to stay in IAR. But if I'm analyzing or cutting code, I'll move to VS for that.
So basically, you can generally use whatever IDE you prefer for much of your development as long as your toolchain for the target provides for being driven by the command line.
I've used Microscope (Vex Platform), EVC++, and the Maemo compilers+Nano for embedded programming. Most of the other tools you request are often found outside the IDE.
However, Netbeans can be configured to compile non-Java code. Its not just not as convenient. If you are developping with C++ you might be able to change the compiler used and you would be able to use the C++ plugin with ease.
Unless you're developing on the device, why not just use the IDE you usually use? You're gonna be cross-compiling anyway.
I used vim especially working with Linux/unix systems with cscope (for source cross-reference). Vim is nifty with latest versions supporting code-completion. Lot of plugins available.
Emacs is a power-horse, lot of customizing support.It support CVS/Clearcase AFAIK.
If you are willing to compromise on in-built compiler and SVN support, then I would say Source Insight is the best tool for your all other requirement.

Good IDE/compiler for simple C dll's

I'm trying to disassemble a C/C++ DLL, and have made some progress, but I would like to create my own C DLL with the same function the original exports, and compare disassemblies.
Visual Studio adds to much crap, and when I remove the crap and build my project, the expected DLL is missing.
I need a lightweight, preferably IDE, tool to edit and build very simple C libraries.
Take a look at Code::Blocks
I need a lightweight, preferably IDE, tool to edit and build very simple C libraries.
I have found that one of the best ways to do integrated C-only Win32 development is using the freely available Lcc Win32 Compiler which comes with a built-in IDE, including resource editor.
In fact, it is really very lightweight and can be run from a USB stick with some manual tweaking.
It's indeed a really small download of just 6 mb and you can even download an optional Win32 API help file which is really useful while doing development.
The compiler also comes with a C tutorial, as well as good user documentation detailing how to use the integrated Win32 resource editor "wedit", there's also an advanced manual about more complex development tasks.
Dev-C++ is a nice and fast IDE which works well with MingW.
But it's all been asked and answered before ...
MinGW adds its own crap. Install your VC express properly and save yourself a lifetime of trouble.
Btw, you don't need to use Visual Studio for its compiler or vice versa. The oddity of missing a build dll is probably because you are not looking at the right path.
If you are building C DLLs you really would benefit from its command line toolset and utilities, sdks, easy config etc. MS lock-in proprietary extensions are widely used (in context of you trying to emulate another dll), and last thing you need is chasing cross compiler issues..
GCC + any text editor such as VIM is a very light alternative.
For Windows Development, all you need is inside MinGW
Edit: If you are in dire need of an IDE you can also use the MinGW tools from Eclipse with the CDT plugin. Although it adds weight to the solution because of the installation of Eclipse, this is what I really use to build my small DLLs (JNI wrappers in my case).
You can setup your small and direct makefiles or let Eclipse do it automatically for you and concentrate only on the source files (*.h, *.c).
The best part of using this approach instead other IDE is that you do not need Eclipse to further build the DLL, since the underlying project files generated are standard ones directly usable by integrated dev inside MinGW (or any Unix distro) such as make, configure, automake, and so on.
I'll second the vote for Code::Blocks, it's what I use (despite having VS 2008 installed as well). It is very simple and lightweight but has basically all the features you'd expect out of an IDE. It comes with several predefined project templates for all kinds of C and C++ development, including templates for DLLs.
Download the version that includes MinGW and you get a complete lightweight IDE ready to start compiling. You can also easily configure it to use the Visual Studio compiler instead of gcc if you prefer.
try Open Watcom. A cross-platform product, well-supported by the community, lets you develop in DOS, Windows, OS/2 etc for a lot of platforms. Version 1.8 was released recently. Has a light-weight IDE indeed

Strict C Win GUI programming

Good day folks, I'm in a need of a bit of guidance.
Basically, I'm a webdev who knows some C from the past, but I've only developed somewhat simple console apps for *nix.
Shortly, I want to develop a simple Win program with a GUI and not get my hands into any of the following technologies:
.NET C#
Java
C++ (especially this one)
Because I have nor the time nor the need for it currently.
1). Can I use wxWidgets without resorting to cpp (if not, what other native looking and lightweight widget toolkit would you suggest?)
2). Can I use OpenCV with strict C? (no templates, inline functions, etc)
3). Should I look for other options for a compiler besides MinGW? Is Intel one worth investigating? (AFAIK, it has a restrictive license).
4). What IDE of the following would you suggest for windows / c programming
Dev-C++
Eclipse with appropriate plugins (can't remember the exact one)
Any text editor + *.bat for compiling??
Thanks!
If you're interested in learning C-based Windows programming directly, and not using other intermediate tools:
There's a really good reference book by Charles Petzold called Programming Windows. It's definitely the way to get started. Absolutely everything is crystal clear, and you never need C++.
The Windows API, as a whole, is built for C programmers. All the fancy stuff like an actual application window is passed back as "HANDLE"s, which are more-or-less just pointers into the OS's object table. You as a programmer never have to deal with objects, just their HANDLEs.
Also, this particular book does a good job describing the Windows event-loop. If you're unfamiliar with it, it is described in generous detail.
Good luck!
For C Windows GUI programming the easiest thing is VC++ (any version since 6.0) and The Charles Petzold Programming Windows book.
The free Express version of the Microsoft compiler should work fine - I'm not sure if you'd have to download the Platform SDK or if it comes with one.
You can write Windows GUI programs in straight C. Download the Windows SDK and look at the "GENERIC" sample (I assume it's still in there). This is pretty much the minimal code required for a Win32 app, and it's in plain-ol' C.
Edit: Hmmm, it doesn't appear to be installed on this laptop. You can find it online here.
It might be worth reconsidering C#.NET. You could easily learn C# in a couple days, and be developing slick apps very quickly. Straight C-based windows libraries, particularly Win32, are BRUTAL in comparison. You'd spend a week just to write a simple app that would take minutes in C#.
The only C-based toolkit I can think of is the Windows port of GTK+. I have no experience using it in the Windows environment though. It is very mature on the Linux side though, and may be good enough if your needs are simple.
Learning the Win32 API is hard! But like others have stated, Petzold's book is the way to go if you insist on going down that path.
My opinion is that developing a Windows GUI using only C and the Win32 API would be harder to learn than picking up just enough C++ to utilize one of the C++-based frameworks. You could still do the majority of your work in plain C.
As for free IDEs, I would go with Visual Studio 2008 Express Edition.
You don't need anything.
Just use C and Win32 api , like real programmers, not kids..
See the VS Win32 wizard
Regarding wxWidgets, you can use https://sourceforge.net/projects/wxc
I never actually heavily used it, so I'm not aware of its maturity.
Mingw and Microsoft Visual C++ are my favorite compilers. Remember you can always use strict C and compile it using a C++ compiler, since valid C is almost always valid C++.
For windows, I've used Dev-C++ in the past, but nowadays Microsoft Visual C++ seems a better solution.
If you're going for text editor+bat, check out Notepad++.
EDIT: Just to clarify, using Microsoft Visual C++ does NOT mean learning C++. You can use C in it perfectly because - I repeat - valid C is often valid C++. Don't want C++? No problem. Just stay away from the C++-only features and you're still safe in a C++ compiler.
EDIT: Roger Lipscombe has noted in the comments that a pure C compiler is available in Microsoft's Visual C, using the /TC switch.

Resources