Is there a C++ compiler in the FC6 distro that actually works?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
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.
I think I interpreted his question differently, or perhaps I misunderstood it, but I kinda thought he was asking why we don't have IDE's with integrated GUI designers. I haven't written Visual* in a couple years, but from what I recall, writing a GUI was so easy, you didn't realize it wasn't a part of standard C/C++/BASIC/whatever.
I suppose, if that is what you meant, my answer would be that Linux doesn't have any one graphics toolkit. I suppose you could say XLib, but no one *wants* to code in XLib. However, check Anjuta, which sorta has one - it calls glade externally.
If Linux does not have a graphics toolkit, then what are the free Qt and Qt Designer with which the whole friggin' KDE is built ?
And then I could go on: What is FLTK ? What is wxWidgets ? What is GTK ?
'Xlib' was nice in 1986 or so, but now we're more like, in 2007.
P.S. - I was also told that it's possible to have a look at source code in Linux. I wouldn't mind actually having a look at the OS source code. How do you do this? Where is it? That would be so cool! (the kernel, or any other program source codes in C++)
Oh, I meant that we didn't have one unified toolkit. Like - windows has win32, and that's pretty dominant. On Linux however, qt is not dominant over gtk, and there are many third choices. I didn't mean we didn't have toolkits, but rather that we didn't have just *one*.
Thank you graemef! I was finally able to actually compile and run my Hello World program, something I couldn't figure out for weeks. Your instructions were crystal clear. Many thanks.
However, with Dev C++ (Bloodshed), I was able to write, compile/debug and run several programs quickly one after the other (with tabs...) with hardly any hassle whatsoever: Ctrl+N (write program) Ctrl+S F9, ... Ctrl+N - write program - Ctrl+S - F9 ... and so on and so forth. I could write completely different types of programs and only two or three files would be added to my folder. In KDevelop, I can't figure out how to write a second program, and I don't understand why you have to start with a template. I don't really understand why there so many files and folders are created either and I didn't get that bit at the end of your message about adding files. I tried it, but in the end couldn't figure out what happened. Did you mean File -> New? Or something else?
In any case, I've transferred all of my little C++ experiments onto my Linux platform, and I'm optimistic. I've also downloaded and tried using Anjuta but can't seem to get that working yet (the manual (help) isn't available). Ditto with Eclipse.
Oh, I meant that we didn't have one unified toolkit. Like - windows has win32, and that's pretty dominant. On Linux however, qt is not dominant over gtk, and there are many third choices. I didn't mean we didn't have toolkits, but rather that we didn't have just *one*.
That's quite OK like this, I find. If there were only but one toolkit, then as in any kind of monopoly, we'd be limited by what these guys and only guys would decide to include in their one-and-only toolkit. Unlike Windows, at lot of Linux distros are shipping with several toolkits installed, so it's not a fuss to get an app that uses GTK+ one day and anopther app using Qt the other day. On Windows, the user would have to install Qt to get Qt apps going. This is not the case with many Linux distros.
For the developer it means choice. Unless a less-knwon or obscure toolkit is chosen, the developer can choose which toolkit he's she's more comfortable with or answers most to the apps' need. And if a less-known toolkit is used, many installation and upgrade systems (yum for instance) will take care of installing, say, FLTK automatically so that an app could run.
I only find great things with having many toolkits in such a context. What would be the drawbacks ?
I only find great things with having many toolkits in such a context. What would be the drawbacks ?
I quite agree, I just meant to explain that such is the reason why most GNU/Linux IDE's don't have built-in graphics, because building them all in would be wasteful, if even possible, and just including one would rob us of our choices.
Yes that was what I meant. in this case you will be building a project that consists of more than one file. I gather from your comments that your exercises require just a single source code. In which case just create a new project.
Why does KDevelop create so many files? It really comes down to the fact that it is designed for big projects (although as you see small projects can be created). With a big project there may be hundreds or even thousands of files. These files can be organised by the project manager within KDevelop, but some of these files that you see are used by KDevelop to manage the files. There is a collection of files to help you build and install the program without having KDevelop, this is important when you distribute your program, because there is no guarantee that the people who take your program will have KDevelop.
Where is your source code?
the source code lives in the src folder src/hello.cpp
Where is the compiled program?
KDevelop (and linux) considers two cases of program, the program with just the instructions called release and the program with the instructions and debugging information called debug. By default KDevelop builds the debug version. This means that you can step through the code from within KDevelop using the F9, and adding breakpoints throughout the code similar to your experiences with Dev C++. The debug code is in the debug/src folder and the release version is in the src folder.
debug/src/hello
src/hello
To select the release version go to Project menu, Build Configuration and select default. The next time that you build the project the release version will be built.
I quite agree, I just meant to explain that such is the reason why most GNU/Linux IDE's don't have built-in graphics, because building them all in would be wasteful, if even possible, and just including one would rob us of our choices.
Whilst this appears a bit off topic I feel compelled to comment because I strongly disagree with the statement.
Maybe this is just personal but I feel that the difference is more of a philosophical one.
Linux is an OS that champions the idea that (to borrow a well used phrase) small is beautiful. Build a small useful tool and someone else will build on it. I use Fedora and over time they have been taking good tools and adding GUI front ends to them. This is an example of adding to a solid tool, rather than reinventing the wheel.
Windows the classic monolithic OS. The desktop is so integrated with the OS that MS say that it is impossible for them to separate the two without breaking the code.
Now as I see it the development environments that come from Linux focus on encouraging you to develop useful tools, there is no distractions. The development environments that come from Windows focus on the eye candy and distract you from the important core.
The mentality is different (and I have observed it) a programmer brought up with a Linux view first thinks about the function, a programmer brought up with the Windows view (or more accurately the Visual development approach) first thinks about how it will look.
Both are important, just listen to any one who uses a Mac gushing lyrical about their OS. The Linux development environments are adopting GUI tools to make it easier for developers to add GUI front ends, but are the visual development environments strengthening their focus on developing a sound core? I don't know since I have long since left that arena, I hope so because I see it as vital to the development of the next generation of programmers.
The above is my personal view and you're more than welcome to disagree with it, but to get back to the statement "IDE's don't have built-in graphics, because building them all in would be wasteful" I disagree with this because Linux is made up of small tools, so as the IDEs develop in this direction they will be able to integrate the different visual development tools because the tools are small independent tools. So, for example, an IDE can take glade and fairly easily integrate into its environment via a plugin, via another plugin it can take QT designer and allow it to be integrated. So the IDE developer doesn't need to create the visual tools just a means of plugging it into their system. This idea was the whole reason that QT removed the integrated editor from their visual designer tool, so that IDE's could integrate it into their environment. So the effort required is not huge, it just depends on whether the IDE developers see a compelling reason to work on the plugins.
I would still defend the point that building them *all* into one IDE would be wasteful. I'm an amateur programmer, and I do almost all of my GUI's in gtk and a little FLTK. Having Qt and WxWidgets built in would be wasteful. Perhaps it's different with KDevelop, I'm a GNOME and Flux user, but the integration I've seen is Anjuta externally calling Glade and pointing it at the same project files. I wouldn't call that integration the same as the integration found in VisualBASIC.
Linux (well, *nix in general) does embrace the divide and conquer philosophy, and I do think that gives us an advantage. However, I wouldn't call stringing different apps together "integrating them." I don't know - I think I'm just arguing semantics - but I suppose I should at least revise to say that we have nothing so tightly or cleanly integrated as Visual*.
Sure I agree the sentiment that Linxu tools do not reach the level of integration found in the visual tools on the windows platform (Delphi, VB .net etc) with probably the exception of monodevelop. But tight integration can be a curse as well as a boon. I don't know what the situation will be for developers who wish to develop for Vista, but the situation used to be if you want to develop for the latest then you have to buy the latest version of the development environment, loose integration (via plugins) means that you can keep the core and just upgrade the plugin to take advantage of the new features. Borlands attempts to develop a cross platform environment (Klyx ?) was a dead duck, because their starting base was too tightly integrated into the original platform.
Okay I think we are on the same page now. :-) I really only meant to comment that we don't have the same integration as Visual*, I didn't mean to imply that it's a bad thing.
Is it also possible to look at OS source code in my computer? I suppose this is possible and imagine it's quite easy to do, however, as I'm new to all of this stuff, I wouldn't want to mess up my system files, configuration, or whatever. I'm not too comfortable browsing in system folders and files, but I'd just like to have a little peek...
It will be all the files in /usr/src/linux/<your kernel version>/
Just try to view them as a normal user who shouldn't have write access to the kernel source. Besides, if you have proper kernel headers installed, the source is only there for a sort of reference, you could delete them completely and it probably wouldn't break a thing. (Might hurt if you try to compile a kernel module that digs into the kernel though)
The path doesn't seem to be the same in my Linux box:
[linux@localhost /]$ ls
bin dev home lost+found misc net proc sbin srv tftpboot usr
boot etc lib media mnt opt root selinux sys tmp var
[linux@localhost /]$ cd sys
[linux@localhost sys]$ ls
block bus class devices firmware fs kernel module power
[linux@localhost sys]$ cd kernel
[linux@localhost kernel]$ ls
debug kexec_crash_loaded kexec_loaded security uevent_helper uevent_seqnum
[linux@localhost kernel]$ cd ..
[linux@localhost sys]$ cd ..
[linux@localhost /]$ ls
bin dev home lost+found misc net proc sbin srv tftpboot usr
boot etc lib media mnt opt root selinux sys tmp var
[linux@localhost /]$ cd usr
[linux@localhost usr]$ ls
bin games kerberos libexec sbin src X11R6
etc include lib local share tmp
[linux@localhost usr]$ cd src
[linux@localhost src]$ ls
redhat
[linux@localhost src]$ cd redhat
[linux@localhost redhat]$ ls
BUILD RPMS SOURCES SPECS SRPMS
[linux@localhost redhat]$ cd SOURCES
[linux@localhost SOURCES]$ ls
[linux@localhost SOURCES]$ cd ../RPMS
[linux@localhost RPMS]$ ls
athlon i386 i486 i586 i686 noarch
[linux@localhost RPMS]$ cd ../SRPMS
[linux@localhost SRPMS]$ ls
[linux@localhost SRPMS]$ cd ../SPECS
[linux@localhost SPECS]$ ls
[linux@localhost SPECS]$ cd ../BUILD
[linux@localhost BUILD]$ ls
[linux@localhost BUILD]$
Don't know where it would be...
By the way, I noticed you're familiar with several Linux distros. I'd like to install a different distro on a friend of mine's computer. I don't consider Linux a headache (lol), but rather a learning experience, and one that I'm enjoying. So the idea isn't necessarily to install an easy-to-use Linux distro, but rather to install a distro much different from fc6 and which will force me to learn more about Linux and computers in general. What do you think? I'd obviously want a decent distro, and a free one too. Are there any free UNIX distros available? I imagine that you couldn't install them on a regular desktop computer. It would be a dual boot XP/Linux setup. Let me know if you have any ideas...
Well, there's a whole continuum between easy and hard, the easiest being, maybe mandriva or pclinuxos, the hardest being Slackware. As a good in-between, I'd recommend Debian. The package manager is great, it's very well supported, and it's about the middle of the road in difficulty. If Debian turns out a bit too hard, try Ubuntu, but then you fall on the easier side.
In my general experience, any Linux distro will teach you more about computers than windows, but I think Debian might be what you're looking for. By the way, I used to use fedora, sorry I forgot they put the kernel source in funny places (actually, I thought they did a lot funny). It'll be in /usr/src/redhat/. By it's absence, I'm guessing you don't have the kernel source. Type this to get it:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.