Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-08-2005, 05:38 PM   #1
Registered: Sep 2004
Distribution: debian sarge 64bit (AMD)
Posts: 709

Rep: Reputation: 30
making your own programs for linux

I have made prgrams for windows in java/vb. I was wondering what language do u use to make programs in linux. This is my first time making programs for linux so please assume i know nothing but oviously i have some programming knowledge.

Am using fedora 3 with the KDE desktop. Also I would need to know how wud i compile the program. Preferably I would like to make the it install via RPM but if u reckon it's to hard for a newbie then make scripts are fine.
Old 06-08-2005, 06:18 PM   #2
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
The kernel is written in C and I would say most programs written for Linux are written in C or C++, but there is no reason to use only one language. The GNU compiler supports C, C++, Java, Fortran, and Ada. You can compile programs using the command "gcc" or "g++". Check out the man page for GCC by typing "man gcc" at the console. Making RPMs is not hard, type "man rpmbuild" to learn how.
Old 06-08-2005, 06:23 PM   #3
Registered: Jan 2005
Distribution: Arch
Posts: 120

Rep: Reputation: 17
You can program in Java just the same as you did in Windows. Others than the already mentioned are Perl and Python, most likely already installed with your distro,
Old 06-08-2005, 07:32 PM   #4
LQ Guru
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Its hard for someone to switch from one programming language to another. I suggest searching for books that compares the basic code to C/C++ code. This way you can see the syntax in a new langauge from the langauge you already know. There is a lot of information on programming in Linux, so search the internet.

Python is a good language to quickly make a program.

A project like SWIG, programming langauge wrapper, can be helpful.

Use an IDE (Integrated Development Environment) to help you on big projects and GUI projects. I think eclipse looks good.
Old 06-09-2005, 03:02 AM   #5
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You can use any language to write programs for Linux, but as mentioned above C and C++ tend to be more popular than others. I am not much of a programmer, but a lot of my own simple programs using Python and Perl. You can also create GUI programs using Python and Perl in KDE and GNOME.
Old 06-09-2005, 05:34 AM   #6
Registered: Jul 2003
Distribution: openSUSE Linux, Apple Darwin UNIX
Posts: 66

Rep: Reputation: 15
I have SuSE 9.1 Professional, and I can use just about every language under the sun if I have the time and patience to figure out how. I use C with gcc comiler, C++ with g++ compiler, Java with Sun's JDK for Linux, and C# with the Mono .NET platform for Unix-like operating systems. Mono would probably be good for you because you said you had some Visual Basic experience. Mono does not support Visual Basic yet, but I read in Linux Format that they are working on supporting it. Mono supports C# extremely well. I took Programming 1 at my Unversity last semester (I'm a computer programming major), and the teacher tried to tell me that I needed to put Windows XP back on my home computer to be able to use Visual Studio .NET to be able to do the class assignments in C#. I said I don't have Windows; I have Linux. He said I have free Windows XP CD's and free Visual Studio .NET CD's that you can take home, and I said there is a reason Windows has not been on my home computer in 5 years now. I don't like blue screens of death. He wasn't particularly pleased with my resistance to using Windows or Visual Studio and was very skeptical, but in the end what it came down to was that other people turned in a sheet with their C# code, another sheet with their output, and I turned in a sheet with my C# code, and another sheet with my output, only my output included Linux command line commands, as I compiled it manually on the command line, and Visual Studio users don't. That was last semester. This semester I completed every assignment I did in C# with the Mono compiler, as I did last semester, and was able to complete every assignment without doing any bit of the code any differently than I would have had to do with Visual Studio, and did it entirely on Linux, and got an A in the class. I did not do one assignment in Visual Studio this semester not including the required at school tests. Mono works that well. The only thing Mono is still lacking as far as C# is WindowForms. Without WindowsForms you can't do C# GUI programming; you have to keep it in the command prompt with no graphics. This has been gotten around though by GTK# which lets you use C# to do GTK/GNOME GUI programming. However, Linux Format magazine just had a big story on Mono and said that WindowForms is to be added to Mono by 2006, so then you won't even need GTK# anymore. Nothing will be any different than regular C# on Windows. What might apply to you out of this is that Mono developers are already working on including Visual Basic, though the addition of Visual Basic support is not yet complete. You can do Java on Linux exactly as you did in Windows.

For c:

gcc helloWorld.c -o helloWorld

For c++:

g++ helloWorld.C -o helloWorld // Note the capital C since it is c++

For Java:

java helloWorld

For C#:

mcs helloWorld.cs
mono HelloWorld.exe

You can do just about any programming language on linux!
Old 06-09-2005, 07:30 AM   #7
Registered: Apr 2005
Location: São Paulo - Brazil
Distribution: Mageia Linux 1
Posts: 353

Rep: Reputation: 30
You can program in Java just as you did in windows, but just in case you want to learn something different:

a object pascal Rapid Application Development environment for linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
programs making outbound connections six6 Debian 2 11-03-2004 11:04 PM
making programs always on top with fluxbox linuxhippy Linux - Software 4 10-06-2004 10:33 PM
making programs open on startup kaega2 Linux - Software 3 12-22-2003 07:54 PM
Making some programs default and another questions... Mega Man X Linux - General 4 07-19-2003 05:12 AM
Making Startup Programs for KDE Atroxic Linux - General 2 02-10-2002 05:11 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration