Learn C for programmers [closed] - c

Closed. This question 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 5 years ago.
Improve this question
I would like to learn how to work with C,
The things I have problems with are compilation and makefiles, not so much the C syntax. Most books deal mostly with the language, but what I'm looking for is more the other parts. What IDE and compiler do I use, and how do I use these.
Thank you very much!

I would recommend gcc for the compiler and just a normal text editor for the ide. Compilation and working with makefiles is relatively simple, you could learn all you want by just googling it. I started out with vi and gcc. Now I use eclipse, netbeans, and gedit for when I am using c/c++.

If you are looking at strictly C, than there is nothing probably better on a nix system than Vim and Make.
Programming isn't always easy. Struggle with it and learn.
If you don't mind more C++ than I would recommend the following:
I have also used Code::Blocks which is a free open source IDE available for *nix systems.
On Windows just use Visual C++ Express which is also free.

Both Eclipse and Netbeans have functionality to develop and build C programs.
There's lots of tutorials e.g. Getting Started With the NetBeans C/C++

Much depends of the OS you actually use to compile. Really IDE and Makefiles are not C related and there is books about them. I would suggest to try a minimalist environment (any text editor and compiling from command line) to understand what is under the hood, then go for a full featured IDE.

Use gcc, write a Makefile for every project you make (even a small hello world program), and use gdb to debug. As for editing code, use whatever you enjoy typing in.

Related

Good C IDE for Mac? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
The community reviewed whether to reopen this question last year and left it closed:
Not suitable for this site 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.
Improve this question
I've just started a job where I'm programming in C on a Mac, which is my first experience using a Mac for development. For now I'm using Xcode as my editor, then using make/gcc/svn at the command line for compiling and source control.
Is there a good, full featured IDE out there for Macs that will compile C code (something comparable to VS would be ideal), or should I stick with these low level tools?
EDIT: so I called Xcode a "low level tool" because I was under the impression that it was just a text editor for code, like gvim. I will definitely look into it's compiling/source control features.
You can also try Eclipse with the CDT plugin.
Good ide: Xcode
Good non-ide option: vim/make/gcc
textmate - Download from Macromates website.
The latest version is textmate2 but some people choose to keep using textmate-1.5 because there are significant differences between the two versions and they're both awesome.
I just stumbled over Qt Creator. It seems to hold up really nice where every other IDE failed me when working with a plain Makefile project.
XCode, Eclipse, IntelliJ or Netbeans wouldn't resolve dependencies, or load my project in a good way. In Qt Creator I could just point to New Project » Import Project » Import Existing Project and voila!
Remember that Objective-C is a superset of C (a pretty pure one, if I recall correctly). You should be able to use XCode for editing, compiling, and debugging.
Here's one solution (which tells you to create a C++ project, then rename main.cpp to main.c)... http://www.cs.nyu.edu/~s70201/C_In_Xcode/Xcode_Tutorial.html
Xcode can manage project and compile for you as any IDE. But if you're familiar with CLI, I would recommand you to use a good editor and your usual build tools. Emacs and vim are available on os x (using xcode just for its editor is not ideal). Many mac dev love the excellent TextMate editor, but it is not a free (as in freedom) software.
Obviously 'good' is a subjective decision, but Xcode 3.2 is certainly up to par with what you can do in VisualStudio (if one considers VS good, is another thing of course).
I have a project with 250000+ lines of codes, 10 dylibs, helpfile, all in an SVN (Perforce) etc. and hardly ever go outside Xcode.
Xcode has a few peculiar ways to do some things and the debugger is not quite as powerful as the current one in VisualStudio, but overall there's hardly anything you can not do from within the IDE (and the options to adjust the shortcuts within the IDE, Debugger and Editor to your needs are really awesome).

Beginners' guide for setting up Emacs with gcc/gdb? [closed]

Closed. This question 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 4 years ago.
Improve this question
I looked around the GNU emacs material and didn't find anything helpful.
Does anyone know of a good tutorial for setting up emacs, to basically turn it into an IDE? I'm looking for interfacing with gcc/gdb/make, etc...
Like other answers mentioned, M-x compile, M-x gdb will get you going. While debugging, I'd also suggest gdb-many-windows-mode, which makes Emacs look a bit closer to IDE when debugging.
Besides that and to get closer to "IDE-like features", you can look at:
CEDET http://cedet.sourceforge.net/ for code completion and project support. Excellent tutorial at http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html .
If you don't mind using non-free software, Xrefactory (http://www.xref.sk/xrefactory/main.html) is probably the best (well, the only) refactoring tool. The C version is free, the C++ is not.
Yuval, you're probably being misled by looking for something about IDEs. All that stuff is automagically built into EMACS except for the CScope-like searching stuff.
M-x compile runs make by default, although I reset it to run Ant in java mode.
M-x gdb runs gdb
C-x ` (Ctrl-X backquote) goes to the next compile error
and so on.
Go dig about in the EMACS Wiki. Lots of good stuff. The Programming Category is where you should look.
Good Article
Look at CScope too... you just have to add two lines to your .emacs to be able to navigate through definitions and references
Even though not directly related to C/C++ i find that using a good color scheme is important. Try:
M-x color-theme-select
and you can browse around a lot of different setups if you do not want to create your own.
If you're working with version control system, you can find useful information in another my article about work with version control systems from emacs

Tools for C code refactoring [closed]

Closed. This question 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 6 years ago.
Improve this question
What tools are there that supports refactoring C code (renaming variables, extracting methods, finding method references, ...)
Preferably for a Linux environment, but Windows tools are ok too.
If there's something available for emacs, even better!
Netbeans 6.7 and above have reasonably decent basic C (and possibly C++, but haven't tried it) refactoring. I use it when doing the JNI part of one of my projects, and stuff like renaming vars, macros, functions, finding usages of a function all work well. Definitely worth a try, to see if it does the rest of what you want, if you're not wedded to emacs yet.
For emacs, there is xrefactory but I haven't tried it myself.
I use Eclipse with CDT as an IDE and find that it works well for refactoring and searching code.
Old, but not bad is cscope and the GUI frontend kscope.
Qt Creator is very fast and useful IDE. It's not only for Qt Framework. You can use it for C and pure C++ projects too. Also it have many refactoring features. It's cross-platform and have vi emulation too. For refactoring features please refer it's documentation.
Slickedit is good at refactoring.
Maybe this previous question could help, at least in speeding up the compile-run cycle.
Fast compiling (or maybe more apt, fast lexical analysis) is one of the things needed to create a system supportive of refactoring.
This article discusses some C++ refactoring tools for Visual Studio.

Is there a Windows IDE that can handle both C and Perl? [closed]

Closed. This question 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'm using Strawberry Perl which includes MinGW's GCC, I'm also making use of the GNU debugger GDB and Subversion. How can I have a single development environment that would suit this (other than just UltraEdit, the command shell and IE), and how can I further enhance its features?
I'd have a good look at Eclipse if I were you! Then have a look at the EPIC IDE Plug-in.
Subversion integrates quite nicely with that IDE via Tortoise SVN or even better as mentioned in one of the comments by Davide Gualano, Subversive.
Personally i'm using Komodo IDE from ActiveState. Komodo Edit might suit your needs and is its free alternative.
You can use emacs for windows.
http://www.gnu.org/software/emacs/windows/ntemacs.html
Have you tried Notepad++? It's mostly an "all stops pulled out" text editor with code highlighting for every language you can think of. But, it does have a pretty amazing macro / external command / extension thing, so hooking it up to a compiler is pretty easy.
I'm currently using it for C, Inform, Python, Perl, HTML, and VB.Net, with surprisingly few issues when shifting gears.
Also, FOSS.
(and, I've just discovered that it has code completion as well. Excellent!)
msvc 6 will do the job quite nicely.
my perl is installed at c:\perl\bin so...
under the custom menu, create a new tool.
command c:\perl\bin\perl.exe
arguments -w $(FileName)$(FileExt)
initial directory $(FileDir)
check the Use Output Window.
create a button on your tool bar, to run the tool.
The perl output will come out in the output window.
I'm no Windows developer or IDE user by a long shot, but the combination of Cygwin (for all the handy Unix tools and a better shell) and emacs does the job when I have to work on Windows.
Personally, I'm happily using SciTE for C, C++, Perl and Python development on Windows. Using a single tool has a lot of advantages for me - as becoming expert in it improves my productivity in all languages. SciTE has a built-in scripting language, and is also quite easy to combine it with external scripting, so it's extensible beyond imagination - and that using quite standard tools.

IDE for C application development that you admire most [closed]

Closed. This question 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 5 years ago.
Improve this question
I am looking for a good Integrated development environment for developing applictaions in C language for both windows and linux.
IDE should have:
good interface,
easy file management,
auto filling and
any advanced options.
Tell me which IDE you most admire for these tasks
For general PC application development
For embedded application development in C
If you think it is more specific question then you may also take it as a general case.
Thanks in advance.
For general PC development - Microsoft Visual Studio + VisualAssist
For large-scale development you can hardly find anything better than Source Insight
If you need a cross-platform IDE have a look at Eclipse CDT
For both purposes I'd suggest Eclipse.
I'd describe Visual Studio as the most feature rich and comfortable place to be when writing and debugging code, but it has a narrow target audience - Windows developers.
As others have said, Eclipse is probably your best bet, The large array of available plugins come in handy too. For example, if you want to move to a new source code repository, the chances are there's an Eclipse plugin already written for it. You don't have that luxury with most other IDEs.
Well when I'm working with C I use Vim, with the right plugins I find it to be the best IDE for C around. It takes a little bit of practice to get used to it but once you do you'll just be flying around your files.
Apart from TextMate on OS X which is more a very featurefull text editor, I'd say NetBeans or Eclipse.
EDIT: yes, if you have a mac, you can do PC development with VMWare/Paralles as easily as you would in a "real" PC and you get OS X as a bonus.
I'd say Eclipse is the best choice.
Eclipse page
Check out Code::Blocks, it's pretty good, does C, and is available for Windows and Linux as requested.
Even if it was developed for JAVA first, I like the NetBeans IDE because it has some nice features and it knows about C, too.
CVS/SVN Plugins are available.
SlickEdit is nice cross-platform IDE with autocomplition, macroses, various text editors emulation mode, refactoring capabilities etc... Commercial though.
There's some good advice on C IDEs here as well: C on Visual Studio
I asked about using C in Visual Studio but the answers contain suggestions on a variety of IDEs

Resources