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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-28-2004, 04:13 PM
|
#1
|
Member
Registered: Mar 2004
Location: United States of Bush
Distribution: Knoppix 3.7, Debian Sarge
Posts: 297
Rep:
|
C++ or Java compiler for Linux
The course I'm taking currently requires me to code in C++ and use C++ methods from classes provided by the instructor. I also have some experience writing Java and will be heavily using that language in a course next year.
I'm running MDK 10.0CE and will soon be running MDK 10.0 Official. What can I do?
|
|
|
04-28-2004, 04:24 PM
|
#2
|
Member
Registered: Oct 2003
Distribution: Slackware 12.2, Ubuntu 9.04
Posts: 477
Rep:
|
For cpp, there's g++, which should work fine. I'm not sure, but there may be java extensions for gcc or g++ also, you may want to look into that. I'll take a look at it and see what I can get.
|
|
|
04-28-2004, 04:33 PM
|
#3
|
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337
Rep:
|
Hi PhuckFonix!!!
As Inexactitude suggested, g++ does the job greatly. However, beware that some headers in g++ are different from a windows compiler. For example, the header conio.h is included in Borland, VC++, DevC and a hole bunch of C++ compilers for Win/DOS and it's not part of gcc/g++. Some books, as the the one I read at school, uses intensively the function getch()(from conio.h header file) for either wait the user to press a key or for key events. There're ways around it, but if you are totally new to g++ and C++ itself, it can be a pain. You'll face also a lot of differences like that as well.
Java, the best way is to grab Sun's J2SDK for Linux. It works just like Windows and it's pretty easy to install. There's an extension for gcc called gcj that can compile Java byte code in Linux native code. You gain a hell lot of speed (important, since Java is the slowest thing I've worked with) but you won't be able to compile anything from graphical interfaces, as Swing.
So, maybe, it's better to learn C++ with the softwares they offer at school and the books. Java won't matter, grab J2SDK from Sun and happy coding 
Last edited by Mega Man X; 04-28-2004 at 04:34 PM.
|
|
|
05-01-2004, 07:04 PM
|
#4
|
Member
Registered: Mar 2004
Location: United States of Bush
Distribution: Knoppix 3.7, Debian Sarge
Posts: 297
Original Poster
Rep:
|
I have a copy of borland's include folder now if I need any header files, and I have noticed difference between same language compilers before.
But my problem now is: I run "gcc" in the run command GUI but nothing comes up.
|
|
|
05-01-2004, 08:50 PM
|
#5
|
Member
Registered: Nov 2002
Location: Pennsylvania
Distribution: Mandrake 9.1 and Redhat 9
Posts: 144
Rep:
|
I would recommend using KDevelop for developing C++ code, because of its relatively ease of use to create projects--i think its in Mandy 10.
|
|
|
05-01-2004, 11:55 PM
|
#6
|
Member
Registered: Oct 2003
Distribution: Slackware 12.2, Ubuntu 9.04
Posts: 477
Rep:
|
You have to run gcc from the command line. Just pop up a console or whatever and you should be ready to run.
|
|
|
05-01-2004, 11:59 PM
|
#7
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
Headers such as conio.h are nonstandard anyhow. That is, they implement operations specific to the Windows platform (there are other headers that provide prototypes for cuntions only available on *nix). I am pretty sure that g++ implements most all of the ANSI standard C++ library and STL. But be sure to get a distro with a newer gcc (GNU Compiler Collection, of which g++ is part), since the g++ with version 2 gcc s was missing some amount of functionality.
As for Java, the Java Development Kit from Sun Microsoft installs perfectly fine under Linux, as Megaman X said. You can even get a copy of Borland's JBuilder Community Edition as freeware.
|
|
|
05-03-2004, 07:32 PM
|
#8
|
Member
Registered: Mar 2004
Location: United States of Bush
Distribution: Knoppix 3.7, Debian Sarge
Posts: 297
Original Poster
Rep:
|
Kdevelop is working fine! Though, the speed it builds apps is very slow compared to Windows compilers. On a side note: I hope the KDE team fixes whatever is making things slow.
|
|
|
All times are GMT -5. The time now is 09:53 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|