Linux - NewbieThis 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.
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?
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.
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.
Distribution: At home: Arch, OpenBSD, Solaris. At work: CentOS, Debian, Ubuntu
Posts: 3,625
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.