View Full Version: What linux c++ compiler should I use?

C++ Learning Community > Computer Lab > What linux c++ compiler should I use?


Title: What linux c++ compiler should I use?
Description: On Mandrake 10.1


Nintendofreak88 - February 7, 2005 01:50 AM (GMT)
I installed Mandrake 10.1 and to my dismay it has no C++ compiler... :( So I'm wondering what I should use. I looked at g++ but that's command line and I really would like an ide. I also looked at KDevelop but it says one of the softwares you need is called QT and thats only a 30 day trial. So, what should I use? Any help would be greatly appreciated! :)

Consumed - February 7, 2005 03:01 AM (GMT)
1. You don't NEED an ide.
2. g++ is quite easy to use(g++ src.cpp -o src)
3. QT on linux is free for non-commercial use.

Hope that helps. ;)

Nintendofreak88 - February 7, 2005 03:18 AM (GMT)
Well if i installed g++ then what directory should i install it to? I'm not real familiar with where linux stores its programs... Also I was looking at their mirrors and for the sources downodoads they have gcc-3.4.3 is that the whole thing or just the base? Do I need to download like g++ seperately or something?

EDIT: Also I was reading the install guide and i was wondering when i configure/build are there any options i should pass?

C-Man - February 7, 2005 06:58 AM (GMT)
:blink: WTF? g++ should be installed by default or atleast it shouldn't let you pick
the directory . This just shows how much i k about linux :s ( none )

dr voodoo - February 7, 2005 09:45 AM (GMT)
Yeah, strange I though that every Linux distro (which is not minimalistic to fit onto a floppy) had gcc installed by default. Are you really sure that it's not installed? To test just open a terminal and then type:
CODE
gcc --help


And yes QT for Linux is available under the GPL. For windows there is also an outdated version available under the GPL.

Incubator - February 7, 2005 12:21 PM (GMT)
I have Qt 3.2.1 GPL-ed for windows received free with my book of Qt 3 :)

Abd gcc is not on every distro: linspire doesnt have it, but mandrake does!

to install any software package in MDK just double click the RPM or when its the source:
tar -xvfz package*.tar.gz
cd package*
./configure
make
make install

and Go and install KDevelop, its free, as is Qt, wich btw is also already installed on mandrake


MonkeyMan - February 7, 2005 05:29 PM (GMT)
Man your making it tempting to download linux and try some programming on linux.

PS: Are my posts too colorful? :P

C-Man - February 7, 2005 05:32 PM (GMT)
nah theyr ok :)

Nintendofreak88 - February 7, 2005 10:08 PM (GMT)
Well I guess it is installed since gcc --help worked. Thanks guys ^_^ Now for kdevelop... Also one other linux question: How do I make mozilla firefox my default browser? Not for file browsing but for web browsing. Thankis :) Also it wants to know where my kde dir and qt dir is...

KTC - February 8, 2005 12:47 AM (GMT)
Although I'm sure g++ should be installed already unless you explicitly chosen otherwise, just because gcc is installed doesn't mean that g++ is ;)

As for Mozilla Firefox, try the preference / options menu ??

Nintendofreak88 - February 8, 2005 12:59 AM (GMT)
Firefox doesn't have an option for that on linux (like windows does...) And yes I do have g++ since I already tried a few basic proggies with g++ :)

dorto - February 8, 2005 07:58 AM (GMT)
i would recommend mandrake 9.1 over both mandrake 10.0 and 10.1. KDevelop is not shipped with Mandrake 10.1 and needs to be installed separately. Better install mandrake 9.1 and you get Qt, KDevelop with the installation discs itself.

btw, i prefer the combination of {emacs + (g++) + gdb + Makefile} to any other IDE on linux for big projects. KDevelop is good for starters and Qt/KDE based projects.

C-Man - February 8, 2005 08:55 AM (GMT)
i bet Emacs good and all but i havent a blinking clue how to use it :mellow:

Incubator - February 8, 2005 09:56 AM (GMT)
if you use KDE as desktop then go to the Control Center > Component Chooser > KDE Components > Web Browser and you see:
Open http and https URLs:
a) in an application based on the contents of the URL
B) in other browser

check b and fill in firefox

QUOTE
Also it wants to know where my kde dir and qt dir is...


usually configure searches that for you but in general those are located in
/usr/qt/3/
/usr/kde/3.3

donprogc++ - February 8, 2005 07:36 PM (GMT)
I dont know too much about linux ( wish i had it :( )
( i will get it eventually :) )

dr voodoo - February 8, 2005 08:11 PM (GMT)
QUOTE (donprogc++ @ Feb 8 2005, 07:36 PM)
I dont know too much about linux ( wish i had it :( )
( i will get it eventually :) )

As long as you don't have Linux you want it, as soon as you have it you'll notice that it forces you to think about things which you didn't even know exsited in Windows. (At least that's what it was for me)

C-Man - February 8, 2005 08:19 PM (GMT)
for me it's just a performace isue
if my pc was better i'd use it

donprogc++ - February 8, 2005 10:39 PM (GMT)
QUOTE (dr voodoo @ Feb 8 2005, 01:11 PM)
QUOTE (donprogc @ ++Feb 8 2005, 07:36 PM)
I dont know too much about linux ( wish i had it :( )
( i will get it eventually :) )

As long as you don't have Linux you want it, as soon as you have it you'll notice that it forces you to think about things which you didn't even know exsited in Windows. (At least that's what it was for me)

I have heard that from people
its good cause then you learn about computers more in depht

Nintendofreak88 - February 8, 2005 10:44 PM (GMT)
I tried configuring kdevelop and it works for a bit but then it shows this error:
QUOTE
checking for X... configure: error: Can't find X includes. Please check your installation and add the correct paths!

Also I went to control center-> componet chooser but there wasn't KDE Components... Maybe i'm in the wrong spot?I didnt; see anything for web browsers either...

Incubator - February 9, 2005 10:57 AM (GMT)
then they must have modified the KDE version too much in mandrake.....so sad :(

the includes for X are located in /usr/include/X11

if they arent do a search (locate X11) for them and make a symlink to it:
(as root)
ln -s /path/to/X11/ /usr/include/X11 --> note that /path/to/X11 must containt .h header files, for /etc/X11 is NOT what you're looking for :)

for the ./configure do this;
CODE

./configure --includedir=/usr/include/X11 --with-qt-dir=/usr/qt/3


for more info type ./configure --help in the kdevelop dir

for your default browser setting you might want to check mandrake specific tools then.....its been too long since I have used that so I can no longer be of assistance for that matter.


Nintendofreak88 - February 13, 2005 09:29 PM (GMT)
Well i've decided to just to a knoppix hd install since that already has kdevelop and g++. But a question, how do i install knoppix and keep lilo so taht i can dual boot? Or, are there any other linux os's you guys would reccommend?

Consumed - February 14, 2005 01:30 AM (GMT)
Why not try Slackware? The installer may be a pain for n00bs(ik from experience :rolleyes: ) but it's pretty easy and fun once it's up and running. :dj:

Nintendofreak88 - February 14, 2005 01:34 AM (GMT)
Does Slackware have kdevelop and g++. Also if i were to download and install it do you have any suggestions or could you recommend any settings? Also i'm going to do multiboot (actually i already have mandrake on one partition that i'm going to delete) so will my lilo stay on or will i need to install lilo again?

Consumed - February 14, 2005 01:47 AM (GMT)
It has everything. And like I said, the installer is a pain for linux-newbies, and it's been awhile since I've installed it, so the only setting I can remember really is to install lilo to the mbr(master boot record). There's a guide on the slack site that tells more about the install process, so that might be a bit more helpful.

dorto - February 14, 2005 05:48 AM (GMT)
i would recommend Mandrake 9.1.
its the easiest to install and use.
1. Remember to install the bootloader on MBR(that is the default, so just don't change it)
2. Select as many packages from "Development" section as possible. for eg, select KDevelop here and you will have no problems.
you need to check "Select individual packages" for this.

the GUI in mandrake is very easy to use, easier than many other distributions that i have used. perfect for a desktop system, but not for a server machine.
mandrake comes with both gnu emacs and XEmacs.
all the FAT32 partitions are automatically detected and mounted!!
etc etc...
(Mandrake 10.0 and 10.1 are not as good as 9.1)




* Hosted for free by InvisionFree