LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How To Begin Linux Programming (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-begin-linux-programming-639614/)

dheerajsuthar2008 05-03-2008 10:38 AM

How To Begin Linux Programming
 
HI,
I have been using linux (Red Hat Fedora) for last one year.I have got quite good experience of running the system.But now i want to begin programming in it.I know c/c++,java(core),HTML,javascript.How should i proceed in Linux.Plz give stepwise direction.
Thanx.

pixellany 05-03-2008 11:01 AM

Welcome to LQ!!

I would start by writing programs. First, make sure that GCC is installed, and then dive in and start writing the simple programs. ("Hello, world" and all that.)
For the GUI, you will need one of two toolkits: Qt or Gtk There are some differences in licensing, so read up on that before doing anything you might want to sell.

This book is very good:
http://www.amazon.com/Beginning-Linu.../dp/1874416680

johnsfine 05-03-2008 11:57 AM

I'm guessing the sort of person who would ask this question at all (rather than just dive in), is the sort of person who would be better off with an IDE and some tutorials than just using a text editor and the compiler.

When I recently started starting to try some Linux programming, I investigated IDE's and tutorials and decided KDevelop was the best
http://www.kdevelop.org/
Notice the links to tutorials etc., from there.

I wish I had had enough time to actually use it myself enough that I could really tell you whether it is a good choice. I'm trying to do too many things at once and that one mostly fell through the cracks. But I am an experienced programmer and I think I know what to look for in an IDE and I think KDevelop is better than the others I considered.

LordAnta 05-03-2008 12:51 PM

When i wrote my first program, it was in Borland Pascal 7.0 (those were the days), after that ended up writting code in C under Borland C++ 3.1. After using them, it was easy for me to work with gcc/g++ + a text editor (vi,emacs,joe,pico,mc). It was almost the same thing except that the debugging part was a real pain.

If you are used to program under window$, first read the differences between gcc/g++ and the microsoft C compiler (there are some big differences from header file to how the memory is managed).

So the first thing to read is http://gcc.gnu.org. Afterwards read about make files, configure files, cmake, automake, autoconf.

If you are used to Microsoft Visual Studio, then KDevelop or Anjuta is the best IDE for you. I mostly work with the latest KDevelop, it's very good, but has a bit of problems with the debugging part.

If you want to work with GUI than Qt (for programs under KDE, a lot easier then WinApi) or GTK (a little bit difficult for my taste).

This is for the C/C++ part.

If you want .NET, aka C# than take a look at the mono project http://www.mono-project.com. Almost the same thing, but in some cases even better.

For Java you only need the JDK, JRE, Netbeans or Eclipse for the IDE part.

For Javascript, HTML: Quanta, and if you want to be hardcore a simple text editor :D + firebug as addon in firefox.

And as pixellany said, just dive in, enjoy and you will never go back at WinApi programming.

MattThiffault 05-03-2008 01:27 PM

If you want to write GUI programs that KDevelop + the Qt Library is a great combination. The Qt API is very straight forward, you could easily write all the GUI code yourself. Or, you could use Qt's designer program which will generate all the interface code and then you're free to write the backend (the code which actually gives the program functionality). Now, you can't sell anything you write in Qt commercially, but hey, its linux, GPL it!

pixellany 05-03-2008 02:14 PM

Quote:

Originally Posted by MattThiffault (Post 3141346)
Now, you can't sell anything you write in Qt commercially, but hey, its linux, GPL it!

I thought that you simply had to pay royalties to sell Qt-based SW. (Never read the license--just going by memory from what I have read in books.)

johnsfine 05-03-2008 05:56 PM

I'm pretty sure you need to pay to even use Qt to begin a test project in preparation for writing Qt base commercial software. They very clearly state you can't wait to pay until you are ready to start selling your software. If you start writing it without paying, you are committing to open source. I don't know all the details, so obviously the license itself is a better source than my memory of my interpretation of the license.

dheerajsuthar2008 05-04-2008 01:12 AM

Thanx For All That Replies
 
It was very kind of all of you.Esp for that Qt suggestion.I have already dived into linux programming using GCC n simple text editor.But the problem i was facing was equivalent library for TC conio/dos.h.Will Qt solve that probs??

pixellany 05-04-2008 09:01 AM

Quote:

Originally Posted by dheerajsuthar2008 (Post 3141848)
It was very kind of all of you.Esp for that Qt suggestion.I have already dived into linux programming using GCC n simple text editor.But the problem i was facing was equivalent library for TC conio/dos.h.Will Qt solve that probs??

That does not seem likely. Qt is a GUI toolkit. Unless you entered code that is trying to call a QT function, then I think you have another issue. If you can post exactly what you were trying to do, someone may be able to help.


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