I am taking a C++ programming class and I have an assignment due today :O… Anyways I have the program done and I am trying to build it so I know if it will work and my system (running openSUSE 11.1, AMD Athlon 64 x2, 3 Gig RAM, 2 Gig swap) slows down to a craw, it has been like this for about 30 minutes now. The scary thing is I can take the same code and build it on my PowerBook G4 with Xcode and Apples version of GCC and it sucessfully builds in <4 seconds with a i386 and ppc binary.
The code is not anything complex or anything because this is an introduction class, anyways here is the code
#include <iostream>
#include <string>
using namespace std;
int main () {
string row1;
string row2;
string row3; //Create three seperate strings for use latter
//store the first bit of data into the first variable "row1"
row1= "I saw the big brown bear.";
//store the second bit of data into the second variable "row2"
row2= "The big brown bear saw me.";
//store the third bit of fdata into the third variable "row3"
row3= "Oh! What a frightening experience!";
//Take the above veriables and use them to print out the three lines
cout<<row1<<endl;
cout<<row2<<endl;
cout<<row3<<endl;
//If all goes well return with 0 for no error
return 0;
}
The IDE that I am using is Kdevelop 3, tried 4 but it seems to still be lacking features and can’t figure out the new UI
I’m going to go ahead and submit this because it compiles on my Mac with no errors, but if anyone has any ideas as to what I need to look for to get this to compile on my Linux box that would be great.
I personally have not used Kdevelop, so can’t offer much advice there - but I would go ahead and compile with gcc (g++) on the command line and see what happens, it may well just be with Kdevelop. If that is the case, and you are interested, you might want to check out Eclipse.
Unfortunately I can’t offer any help with Kdevelop, as I have never used it.
I would recommend using gcc. I don’t use anything but gcc to compile c++ programs, I use Emacs to code them, which I would also highly recommend, as it provides so many keyboard shortcuts and syntax highlighting, which it also provides for Java, HTML, PHP, SQL, Perl… pretty much every programming/scripting language I have used.
Anyway, good luck with your programming lessons, feel free to contact me to discuss programming/C++.
I prefer vi/vim over emacs because the vi commands just feel more natural to me. Yes I did give emacs a try when I converted to Linux and was looking for a text editor, but when I found out about vi I was amazed at how easy it was. Also vi does syntax highlighting so that is covered as well.
The problem with Kdevelop 3 is that no s actively working on it, but Kdevelop 4 is just not stable enough. Until Kdevelop4 is stable enough, I’d recommend using Eclipse or QtCreator if you want something simpler.
Unfortunately I don’t know anything about libtool, so I can’t help you in finding out the problem with that command.
I’ve tried VI, and whilst I can just about use it for small file edits when I’m on a system without Emacs, it just isn’t intuitive enough for me to use everyday; also I’m used to the keyboard shortcuts, spellchecker, Email, web browser, multi window/multi buffer, shell, etc functionality of Emacs.
You could also try out Netbeans, if you haven’t considered it, if you really want that kind of GUI IDE to program from.
I personally gave up on all other editors, except when I’m forced to use vi (see above), since I learnt the basics of Emacs.
hi everyone,
i’m a new user here, and have a same problem.
i have a c++ programming class, and i don’t know how to compile my program. at this time i just try “Hello World” program. i’ve tried using Eclipse and Qt Editor, but still i dont know how to compile my program. i found Run button there but i can’t click it, it disabled.
so how should i compile my program?if i should use gcc, how it should be?i’ll be glad if you tell me step by step, because i’m new user in linux.