LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2004, 01:48 PM   #1
sdat1333
Member
 
Registered: Nov 2004
Location: North Carolina, USA
Distribution: None right now :(
Posts: 149

Rep: Reputation: 15
Programing in Linux


I am new to linux and I have a question. If I want to make a program to run natively under linux, what programing linux does it use? C, C++, what? Also, will basic run under linux. Or does it not matter, as long as there is a linux compiler that will compile that language?

Thank you,
-Sean

Last edited by sdat1333; 05-31-2006 at 08:56 PM.
 
Old 12-14-2004, 01:57 PM   #2
csfalcon
Member
 
Registered: Jun 2004
Location: MD
Distribution: Fedora Core
Posts: 269

Rep: Reputation: 31
it doesn't matter what language, as long as you have a linux compiler the resulting program will run.

linux kernel is written in C mostly.
 
Old 12-14-2004, 02:19 PM   #3
mhiggins
Member
 
Registered: Feb 2004
Posts: 140

Rep: Reputation: 15
There are many languages supported by Linux, when you say

"make a program to run natively under linux"

This implies a compiled c or c++ program. If you would like to learn C I would get the venerable
http://www.amazon.com/exec/obidos/AS...073965-6143813

You are not stuck with C though you could use Perl as most distros ship with Perl or you could download the JDK from sun.

Here are 3 ways to write hello world

"C"
int main(){
printf("%s\n", "Hello World");
return 0;
}


Java (in a file called Hello.java)

public class Hello {
public static void main(String[] args){
System.out.println("Hello World");
}

Perl

print "Hello World\n";
 
Old 12-14-2004, 06:02 PM   #4
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Perl is a fantastic language to write in, just beware of thread support when using some GUI toolkits.
 
Old 12-15-2004, 12:23 AM   #5
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 23, 24, RHL 5.2
Posts: 560

Rep: Reputation: 56
As others have already pointed out there are a large number of programming languages that can be used in the Linux environment. Ask 10 people which language is best and you'll probably get 20+ answers. The GNU Compiler Collection supports a number of programming languages C, C++, Objective C, Fortran, Java. GCC will most likely be included with your Linux distribution since much of Linux is written using it. Search the net and I'm sure you will find a great many languages supported by Linux.

You mentioned BASIC which I have not thought about in a long time. That was the first programming language I had exposure to way back around 1975-76. I decided to do a search and found an interesting article at The Linux Documentation Project. In my opinion it is worth a read both for information and a bit of history. Unfortunately there aren't standards for the BASIC language so whatever you write isn't as portable to other operating systems.

Bill
 
  


Reply


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
programing in java on linux phoenix_wolf Linux - Newbie 21 01-26-2005 07:35 AM
Serial programing in c on Linux OS branens Programming 2 01-19-2005 06:35 AM
Programing in Linux for Windows FireInTheDark Programming 3 10-31-2004 01:31 AM
Programing in Linux jimbob1989 Programming 1 10-10-2004 11:53 AM
From complete newbie to C++ programing in Linux Replicator 3.0 Programming 12 05-10-2004 03:23 PM


All times are GMT -5. The time now is 10:46 AM.

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