Mac osx development environment

I have a unix c programming purpose in which I do some advanced network programming C. This is my first step in promoting programming. so I was wondering which one is best for Mac. using an IDE like Eclipse is the way I usually do it, but I have to make my own files and stuff. so I would like to know how to do this efficiently using emacs or vim + other tools. it will be a rather large project, so I am concerned about the problem of project management and debugging mainly, as well as a performance factor. in essence, I want to learn how programmers do this in a professional environment without the bloated part of the IDE. I use Snow Leopard.i, I will also go into C ++ and python in the future, so there may be something that will be useful for them as well.

+4
source share
3 answers

I know that you are asking how to do this with make files / VI / etc. but on a Mac, Xcode is really the way to go, especially for large projects. This is a very efficient shell that will call gcc and gdb and the linker for you. Especially when you switch to a new platform, you don’t need to worry about all the unpleasant details, it will be a big leap in performance. This IDE debugger is pretty cool.

Of course, you can also use make files, etc. Many projects (for example, for OpenSSL as an example) come with make files, and you can compile them on a Mac from the command line, as in * ix operating systems, that is, when calling ./configure and then do. But configuring such things (for example, compiler options for universal binaries, etc.) is tedious, and in the IDE there are several options. In addition, if you ask specific questions about Google, you will find many more answers on how to do this with Xcode.

If you want to get started with Xcode, it's either on the Mac operating system CD (it just doesn't install automatically), or you can download it from Apple. When you run it, just open a Mac OS X project like “Application - Commandline Tool” and you will have a project with main.c setup in a minute. Then you can simply run it or run in this debugger, and adding additional source files to it is pretty simple.

Xcode can be quite a beast to create an already large project (we placed a large project with DLLs and exes-dependent (total 250,000 lines of code) on a Mac, and just getting everything set up wasn't what you call a piece of cake), but if you start from scratch, you can easily grow into it.

The bottom line is that Xcode is definitely equipped to work with large projects, and I cannot imagine a more productive way to do this (I used handwritten makefiles manually in the past, so I know both worlds).

+4
source

Xcode is your friend. It is a free and very nice IDE. When you start Xcode, just launch a new console application (this will be ANSI C).

Enjoy.

+4
source

If you study the rudiments of unix editors, shell programming, make, etc., are part of the assignment, you just need to dive in and find out what you need to learn. Some good books will help. Obviously, you need K & R. I always liked O'Reilly books for Unix materials, usually because they are the thinnest. I hate thick computer books because they are never read. You should also learn how to use the manual pages.

Wim vs. Emacs is a religious choice. If you ask any Unix guy what is best, he will certainly tell you the one he knew first, because most likely he never knew the other. In my case, I used Vim for so long that my rescue key is worn out and the commands are hardwired to my brain. Obviously, I think this is better than emacs (which I never knew!) If you are lucky enough to have a Mac as a workstation, install mac vim. It's great.

Make is sophisticated enough for you to never deal with this. Just learn how to compile and link your program. You can always find out more if you need it.

Version control is an interesting question ... I use RCS for small things. Like vi, it is on every Unix machine. For really large projects, I use subversive activities, but like editors, most people use what they learned first. Git people will say that its only thing to use, etc.

Command line debuggers are a pain that is Xcode's main selling point. I used gdb, but I do not remember it as a pleasant experience. Its as long as I used it, I can’t even remember how to start it. By now, there should be better debuggers. Try Google.

Below, all that you mentioned are big topics. You need to take realistic bites of everyone and not get confused in the weeds. It may take years to master them.

Finally, I will stay as far away from C ++ as possible! Goal C is much better. Personal biases!

+1
source

All Articles