I wrote just a simple Hello World program to try and get used to Code::Blocks but when I compile and run it I am not getting any return except this in the log: “HelloWorldCpp - Debug” The compilers setup is invalid so Code::Blocks can not find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! skipping… I was also wondering what type of project would I do for simple C++ programming like this while I learn the language and what is the difference between like Console and Fortran?(This could be my problem.) I have been using console application for project then just creating C++ file and writing the code. Bear with me I am new to linux. Thanks to anyone who can help,
well “console” is just a terminal window. Running a program from console means that you type its name in a terminal window (command line) and it is executed. Fortran, on the other hand, is a programming language, just like C/C++, Java, Basic etc…
I can’t really help you with Code::Blocks as I’ve never used it. The error does suggest, though, that either the C++ compiler isnt installed, or else Code::Blocks doesn’t know where to find it.
Ahhh okay yeah that’s basically what I figured about console but as far as the other options opposed to that? I am used to using Visual Studio to create windows form applications and am not sure what my other options are for C++ projects. Also wondering if there are any IDE’s in linux like Visual Studio where you can create GUI’s easily within the program. And no I don’t want to run wine and do it as I have heard it can be pretty faulty. Thanks,
The GUI tools are toolkit dependant. For RAD style GUI creation in gtk+ you have glade, make sure you get the right package I think it’s called glade3, it’s better than the old one, and you would want to use that and use gtk builder or whatever it’s called (not libglade, that’s basically deprecated, or if it’s not it should be it’s not as easy to use and less well integrated in gtk). Devhelp is the gnome documentation system.
I guess you would use QT Creator or KDevelop as ide’s for a QT, never used it but I hear it’s better than glade.
I used to use gtk+ because it’s in C and that’s what some of my old projects were in and at the time I wouldn’t have been able to wrap them in C++ because I wouldn’t have known how. I would recommend trying something else, with QT being the prominent alternative. The gtk+ documentation was often acceptable until you needed it, when it totally glossed over stuff like api calls that were totally cryptic. Maybe it’s better with the C++ wrappers though, never tried them.
Oh and anjuta, the gnome IDE that uses glade as the GUI builder, is not for the uninitiated, it uses autotools as it’s build system which is great if you are using it for your source distribution or you just happen to know autotools, but probably needlessly frustrating if you don’t. It is not bullet proof, it is likely you will have to edit your configure.ac or a Makefile.am file by hand at some point. Autotools is a notoriously archaic mess, that states in its documentation that making a developers life easy is not very high of a priority. You could just use another IDE and make the GUI in glade.
The Eclipse C++ support is in a package called CDT, you download it within eclipse, it’s under the help menu option somewhere I believe. If you go the eclipse route I recommend getting the latest version and installing that instead of the one in the openSUSE repositories, which I could never get to work correctly. No idea about it’s gui creation tools.
Okay thanks guys. I was wondering where the Qt plugin is? Or how do I get it if it isn’t a plugin? Through yaST?
Also I tried running this sample HelloWorld Program with a built GUI just trying to run it and it is asking for a path to a toolkit to “Resolve Missing Native Build Tools”. Any help is appreciated thanks.
Alright thanks. And this will automatically designate the path to the compiler? Because I think that is my issue now is the plugin didn’t tell me where to designate the path to.
Also tried to download and run that file but something seems to not be working right. A window comes up and then it just times out when I try to click the Netbeans6.9.1.SH from the start menu.
This usually happens if you don’t have a JDK installed first. I highly recommend getting the Netbeans cobundle, which includes both the JDK and the Netbeans IDE.
Then after that make sure you install the gcc and gcc++ and make, if you haven’t already. Then get the C/C++ plugin in Netbeans, restart the IDE and go to Tools, Options. You should see a C/C++ tab. Netbeans should pick up your C/C++ compilers automatically.