Okay, just got into linux, and how does one go about doing C++ development in linux? Can one just use 'vi' to edit text, and then call the g++ compiler? Or does Debian come with a c++ environment? I did find a good IDE, Dev-C++ for linux, but it was made 5 years ago.

I would prefer t o use an IDE as opposed to going back to my roots ^_^ So if anyone knows any good ones (Open Source prefered), yeah, that would be great...

(I couldn't decide whether to put this in the linux forum or the C++ forum, so I just picked the closest I could get.)

Recommended Answers

All 13 Replies

Oooh... many different ways of programming in Linux.

There's the bare-bones programming in Vi or some other text editor, and then compiling with gcc/g++. This is best for small projects, because anything larger, and the syntax becomes too complex.

There are also LOTS of IDEs out there for Linux. You've already named one, Dev-C++, and although it's old, it's still perfectly good and works well. Another good one for Linux is Code::Blocks, which is similar to Dev-C++, except it's a more recent IDE. Then there's the good old KDevelop, which is designed for KDE, although it's possible to run it under Gnome, too.

Hope this helps

Well does anyone use codeblocks? because I don't think I could ever figure out how to install a nightly build. And Debian packages are really scarce on that site. The ones that do exist have been taken off the server they were stored on. Is there any way for me to use a pakage for, say, ubuntu? I know ubuntu is derived off debian...

It might work, but seeing that the Code::Blocks Linux packages aren't even official -- merely created by their users, it might be a better idea to build the Code::Blocks from source. You will get better stability, and it should be non-trivial. Here's the direct source download:
http://prdownloads.sourceforge.net/codeblocks/codeblocks-1.0rc2.tgz?download

And here is a good compiling guide:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux

Have fun!

Hey, any chance that building from the source always makes it usable on that type of architecture? And the distro differences are solved this way? because that would pretty cool.

However, the last time I tried to apt-get --build source something, it told me that my C compiler couldn't generate the sources. I think it might have something to do with the fact that I tried to fall-back a couple of versions so my module-assistant would work... but gcc updated itself to its previous state, at least I thought...

Hey, any chance that building from the source always makes it usable on that type of architecture? And the distro differences are solved this way? because that would pretty cool.

Yes, that's usually how it's done. Most developers are too lazy to compile seperate versions for all the major distros, so a lot of the time they simply give you the source code and let you compile it.

Of course, at first you'll only be downloading the "large" applications, which of course offer binaries. Sometimes I think too many binaries spoil Linux users.

However, the last time I tried to apt-get --build source something, it told me that my C compiler couldn't generate the sources. I think it might have something to do with the fact that I tried to fall-back a couple of versions so my module-assistant would work... but gcc updated itself to its previous state, at least I thought...

Not really sure... I rarely use apt-get for source code, as I prefer downloading my tarballs from the official source. Another advantage of this is that you then end up with more up-to-date sources, as it takes longer for the Debian respiratory to get updated. Another thing it could have to do with is the fact that you were having problems with your apt-get respiratory system before.

hmmm... I wonder why wine didn't work, then...

hmmm... I wonder why wine didn't work, then...

Well, for one thing, Wine requires an x86 processor. Although almost all Linux programs compile on any architecture, Wine requires the x86 structure to be able to provide Windows compatibility.

If you do have an x86 processor, and are simply having problems compiling, the most likely reason is that you don't have the correct libraries installed. Almost every program out there requires some external libraries when compiled, and instead of providing them with the source code when the program is distributed, the developers usually expect you to download any libraries you need. The needed libraries are usually listed in the README file, so check there if you're having problems.

Also, you need to make sure you have a compiler installed (gcc/g++). If those and a few other critical tools aren't installed (automake, autoconfig) there's no way that the source code is going to be compiled. You can do some apt-getting, or use a graphical package manager if that is your preference.

And post any error messages you get here.

anjuta may be worth a look - can't believe this thread got so far without a mention.

hmmm are there any that support amd64 architectures? because I am really sick of all this no-64-bit-support bull.

If you compile them yourself, you can add a 64 bit compilation flag. That doesn't mean it's optimized for 64 bit computation, but at least it will run, and probably faster than if you used a binary.

well I did compile the source on my computer, which should put a compilation flag on it, but it didn't work.

Do I have to manually put it on?

Do I have to manually put it on?

Possibly. I admit I don't have experience with 64 bit computing, but I do know that there's probably some 64-bit related flags listed if you run ./configure --help before compiling, especially pay attention to ARCH= ... settings. Also, do the programs that have errors actually run to some degree, or do they just quit saying, "no 64 bit support"?

well some say "This program is not supported by your current architecture"

Those are binaries, though. I usually can't get the source for them if I use a binary. Wine ran to some degree, but it didn't actually do anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.