LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   programming in linux (https://www.linuxquestions.org/questions/programming-9/programming-in-linux-713587/)

mbvo 03-22-2009 01:20 PM

programming in linux
 
I've been writing programs since I was 7, unfortunately only on dos annnd windows. I've used borlands tools including assembler, turbo c, turbo c++, turbo pascal, delphi, c++ 4.5, and even tried out c++ builder and jbuilder. but i've gotten so used to having an ide and if i needed to know something it was all in the help, I dont know where to start using gcc. is there some sort of reference i could use?

pixellany 03-22-2009 01:23 PM

http://gcc.gnu.org/onlinedocs/

"Beginning Linux Programming" from Wrox (Should be on Amazon....)

ta0kira 03-22-2009 01:41 PM

This is without a doubt the most useful resource I've used when programming in Linux:
glibc manual

Also available as info libc, or info:libc in the address bar of Konqueror if you have KDE. The manpages for specific functions are a very close second, followed by info gcc and info ld.

I also think learning to program in Linux using an IDE will really hurt your programming skills. I've done some fairly large projects and I still don't use an IDE; just Kate and a terminal emulator (although Kate has quite a few advanced features.) You really need to know how the build system works to get good at Linux-specific programming and you can't pick that up if the IDE does all of that for you. Plus, you need to have a way out if the IDE doesn't work correctly or doesn't do what you need done.
Kevin Barry

PS I have to admit that seeing what questions are asked in this forum lead me to research several things I wouldn't have known about otherwise.

H_TeXMeX_H 03-22-2009 02:27 PM

I don't like IDEs either, but I absolutely must have syntax highlighting ... so use a text editor that supports it.

If you want an IDE, I recommend geany.

graemef 03-22-2009 06:22 PM

There is as sticky thread List of Free Software and Freeware IDEs which will give you some idea of the IDEs that are available. I don't subscribe to the view that using an IDE will hurt your programming skills, the various tools that the IDE brings together are just that tools and you can learn them when you have time, but if you just want to get up and program then learning to use an IDE can certainly help.

If you are running KDE then I'd recommend that you look at KDevelop. (I actually use it under gnome)

sundialsvcs 03-22-2009 09:32 PM

One thing to consider when dealing with Linux programmer-tools is that these folks are often working with several fundamentally different programming languages at the same time, on the same project. So, the systems are not nearly as tightly-coupled as what you may be used to in Windows.

Whereas Windows basically does not come with any programmer tools, every Linux system on the planet might have a half-dozen available by default ... all free ... with many, many more (also free) at your beck-and-call.

"Look out! We have a choice, and we're not afraid to use it!" :)

ta0kira 03-22-2009 09:39 PM

It also depends on what sort of programmer you are. Many people choose practical problems that are in need of solving; that's how a lot of open-source software comes about. I generally set out with some sort of lofty practical goal and get sidetracked for years at a time and end up learning things I never knew about when I started. In general I give myself an arbitrary starting point of something I find interesting and acknowledge that I probably will never finish it, but will come up with something "better" instead. If you're not like that, you might want to look around some of the open-source hosting sites for "help wanted" and see what you can contribute to. That's really a good way to learn because you'll have specific problems you need to learn how to solve.
Kevin Barry

cloud9repo 03-23-2009 07:20 PM

Quote:

Originally Posted by mbvo (Post 3484135)
I've been writing programs since I was 7, unfortunately only on dos annnd windows. I've used borlands tools including assembler, turbo c, turbo c++, turbo pascal, delphi, c++ 4.5, and even tried out c++ builder and jbuilder. but i've gotten so used to having an ide and if i needed to know something it was all in the help, I dont know where to start using gcc. is there some sort of reference i could use?

try search, googled: "linux programming IDE".

Should show a few. Now, if your just wanting to "ripbit", then serpantine spins goodest.

jschiwal 03-23-2009 07:32 PM

For C programming in Linux, I'd recommend this book:
http://www.amazon.com/Linux-Programm...7854535&sr=8-4

I helps understand the differences in C programming using the GNU library vs Classic Unix C programming. It also has some code for early Unix commands and explains how they work.

linus72 03-23-2009 07:32 PM

OK-I'm bitin-where do I get Kate?
Says it comes with KDE-do I have it?

ta0kira 03-23-2009 08:00 PM

Look under Utilities -> Editors in KDE. You probably have it in Slackware, but I had to apt-get it in Unbuntu specifically. Not sure about other distros.
Kevin Barry

salasi 03-23-2009 08:07 PM

Quote:

Originally Posted by linus72 (Post 3485560)
...where do I get Kate?...do I have it?

You should do, but you seem to be in a better place than me to tell definitively. For me, in kde4 it was in kde4-kate and for kde3 in kdeaddons-kate, so the name of the meta-package (actually that's the wrong term, but I'll assume that you know what I mean) might vary a bit, and normally you would get it 'automagically' with kde, but if not, it should be easy to add.

'locate kate' (assuming that you use locate) should show up things like:

/usr/share/kde4/apps/kate
/usr/bin/kate

(and a load of other crud). (On an rpm distro, rpm -qa |grep -i kate would show all packages with kate in the name, but you probably aren't talking about rpm.)

And, to the OP, there's nothing wrong with typing 'man gcc', just don't expect to get a tutorial, more a cheat sheet of the useful options.

Sergei Steshenko 03-24-2009 02:45 AM

Quote:

Originally Posted by linus72 (Post 3485560)
OK-I'm bitin-where do I get Kate?
Says it comes with KDE-do I have it?

On my box:

Code:

sergei@amdam2:~/junk> which kate
/opt/kde3/bin/kate
sergei@amdam2:~/junk> which kwrite
/opt/kde3/bin/kwrite
sergei@amdam2:~/junk>


mbvo 03-24-2009 08:49 AM

Quote:

Originally Posted by ta0kira (Post 3484526)
It also depends on what sort of programmer you are. Many people choose practical problems that are in need of solving; that's how a lot of open-source software comes about. I generally set out with some sort of lofty practical goal and get sidetracked for years at a time and end up learning things I never knew about when I started. In general I give myself an arbitrary starting point of something I find interesting and acknowledge that I probably will never finish it, but will come up with something "better" instead. If you're not like that, you might want to look around some of the open-source hosting sites for "help wanted" and see what you can contribute to. That's really a good way to learn because you'll have specific problems you need to learn how to solve.
Kevin Barry

I started out on "delphi for windows" on windows 3.11 on a dual 386 when i was 7 from teach yourself delphi on 31 days. my method is more like i learn something new, then i try to figure out what i can do with it, along the way i learn a lot more. the only 3 programs i really wrote that i was intending on writing before i sat down to the computer was a basic screensaver, a typewriter program that took keyboard input and put it streight to lpt1 where i had a ibm dotmatrix printer written in assembly code, and a program compiled in both dos and linux and written in c and delphi that reapeatedly xors each character of a password string with each character of a message string(which was unfortunately lost due to the fact that i saved it to a 5 1/4" and my drive went bad).

theNbomr 03-24-2009 09:55 AM

All of the question about where/whether Kate (or almost any other editor, IDE, or other GUI tool) exists, points to the fact that vi is about the only text editor that is virtually guaranteed to be present on any Linux/Unix host. Learning the basics of vi will serve you well if you are going to be involved in Linux as a programmer or Sys-Admin for any length of time.
My take on IDE's is that they are great as long as they are actually helping to reduce complexity. When you are at a low spot on the learning curve, they are a component that actually adds complexity, and are therefore counterproductive. When I've had to sit down at an unfamiliar IDE, I have always found myself wondering whether the problem I was trying to solve at any particular instant was actually part of the overall, real problem, or simply a lack of understanding of the tool. If possible in these circumstances, I felt a lot more comfortable when I could jump back to good old commandline tools and Makefiles, which are a lot closer to the mainstream of my knowledge base, and are revealing, rather than concealing.

--- rod.


All times are GMT -5. The time now is 09:05 AM.