In the next month I have to shift to work on the ubuntu system and writing c/c++ programs. I used to program in windows visual studio for some years.
What should I do to prepare the shift suddenly? And how to debug in that system?
|
In the next month I have to shift to work on the ubuntu system and writing c/c++ programs. I used to program in windows visual studio for some years. What should I do to prepare the shift suddenly? And how to debug in that system? |
|||||
|
|
One of the most efficient C/C++ development environments are Emacs, which at least should be considered by anybody in your situation.
|
|||||||||||
|
|
Learn your new tools. And if you can choose them yourself, test out a bunch of IDE's and find the one you like the best. With a good integrated IDE, the shift will not be very brutal, and you debug as you do in Visual Studio (but with other key-combinations and other minor differences). You can in Unix develop by using vi or emacs and command line tools like gdb etc, and you find many experienced programmers doing that, but that's a much bigger step than just switching to a new IDE. |
|||
|
|
|
Have a good look at command line tools: make, m4, sed, grep, perl Read up on the design of Unix-like operating systems; the everything-is-a-device concept which is quite different from the windows approach, the filesystem and the tools-connected-by-pipes way of combining tools. Debugging is done with gdb which can be used from within editors like emacs to give a nicer debugging environment. It does pay to learn the gdb commands so that you can use them from a termimal session too. |
|||
|
|
I believe the majority of Unix / Linux programmers still tend to use the mix of editor (vim | emacs), make, and gcc/gdb for C and C++ programming. Well, at least I do. The two most common C libraries are the Standard C Library (normally glibc for Linux), and POSIX (IEEE Std 1003.1-2008) / Single Unix Specification from OpenGroup.org , IEEE, and Austin Group. The two most popular Unix programming reference books are Advanced UNIX Programming by Marc J. Rochkind and Advanced Programming in the UNIX Environment, 2nd edition by (the late) W. Richard Stevens and Stephen A. Rago. Learn how to write Makefile's and life without an IDE will seem sane. But bear down and learn autotools if you need to support multiple Unix/Linux platforms. I also recommend cppcheck and valgrind as additional development debugging tools. I am not familiar with the IDE options enough to recommend, but I believe Eclipse, NetBeans, and KDevelop each have their followings and I believe are still be maintained / developed. |
|||
|
|
Be sure to understand make and makefile dependencies. The syntax will bug you, but understanding the way stuff that is needed is pulled up and changed files cause recompilation will really help. Trust me, on any C/C++ based code above a certain level of complexity, this is vital. |
|||
|
|
I found that Netbeans is quite a robust IDE for C/C++ in Linux (also used it in Ubuntu).
Also, I'd start thinking in portability: |
|||||
|
|
I have to echo @Malfist's comment about KDevelop. It's by far the best IDE I've used. It's extremely powerful for C/C++ development and the IDE features such as code coloring and such are great and actually something I really miss in Eclipse for java/python. |
|||
|
|