Having trouble using codeblocks IDE. Quick run through?
I just recently switched over my main machine to full time linux. One of the things I liked from windows was bloodsheds C++ IDE, I have been trying to get used to codeblocks for Kubuntu instead, but I haven't all figured it out. I just simply want to want to create a simple "hello world" app that I can compile and run from the IDE, so then I can start working on assignments for my intro to structure programming class. Help getting that far would be great, thanks :).
|
Quote:
I.e. why can't you for starters use plain gcc/g++ ? |
IDEs make my life much easier. Without one I will probably just continue to program in windows.
|
Quote:
|
I'm using CodeBlocks a little in both Linux and Windows. In Linux I did have some initial problems because practical use of CodeBlocks depends on some other packages that are not identified as dependencies, so Synaptic (the package manager I use) did not install them.
Unfortunately I didn't record the details anywhere. CodeBlocks UI is fairly obvious, so I think it is not so likely that you don't understand how to use it and more likely that you haven't installed some of the other software packages you need in order to use it. If you are trying something that looks like it ought to work but doesn't, it probably should. Describe what you did and what went wrong and hopefully someone can guess what software is missing. If you know what is missing, then it is trivial in Synaptic to install it. Obviously you need to install the compiler and associated headers and libraries for software development in C++. CodeBlocks installation rightly does not assume your chosen language is C++. Ubuntu has a package called build-essential that brings in several of the most important packages needed for building other software. So make sure you have that installed before even asking what else might be missing. There are also basic tools for auto generating makefiles that I think CodeBlocks always needs but that also are not installed automatically when you install CodeBlocks. Quote:
Quote:
So if you really believe an IDE isn't a valid path for the OP, your replies could have constructive intent. But even if you and many others never want to use an IDE, it is very hard to argue that it isn't a valid choice for those who want to. I expect the OP would appreciate cutting off the discussion here about whether to use an IDE and continuing this thread only on how to use an IDE. |
Quote:
Thank you, your reply is much appreciated. My needs are really pretty simple, I just want to create console applications, compile, and run them. I need to be able to link with .obj files, and I need the compiler to be able to direct me to the line of code that an error exists. I am not doing anything OS specific, just C++, so I really only need functionality. I try and start a new console projects, using only the namspace std and iomanip class, and when I hit the button to compile and run nothing seems to happen. |
Quote:
Quote:
Quote:
I also have autoconf and automake installed in my system. I got a failure similar to what you describe while testing some IDE quite a while ago and got past it be installing those two packages and a few other (probably it only needed automake). I don't think that IDE was CodeBlocks, but it might have been. Also, in synaptic find and click on codeblocks, then click on the Dependencies tab, and look at the items that say Suggests or Recommends. Those are other packages needed for various features of CodeBlocks. You ought to look at the description of each of those in Synaptic to see whether you want to install it. |
Thanks, I am going to play with it a bit more and post back if I have problems. Is there a way to convert .obj files to .o, or might it be possible to run them or another IDE with WINE?
|
Quote:
But there are "deeper" problems:
|
Quote:
Also, are you using 32 bit or 64 bit kubuntu? And are those 32 bit or 64 bit Windows .obj files? I expect you could install a 32 bit Windows CodeBlocks plus Mingw into 32 or 64 bit kubuntu within wine and develop and test 32 bit Windows programs in kubuntu. I don't think it would be easy. But I don't think there would be any really serious problem. I don't know the level of support for 64 bit Windows, so I don't know whether 64 bit Windows programming in Windows codeblocks in wine would be flat out impossible or merely harder to set up than 32 bit. I don't have much VM experience, but if you want to work on Windows programs in an IDE in Linux, you'll see a lot more people ahead of you able to guide the way if you use a VM rather than wine. For the alternate approach, I'm not sure any conversion of .obj to .o to link Windows .obj files into Linux programs would be practical. But there as well, I do understand several reasons why however hard it might be in 32 bit, it would be even harder in 64 bit. |
Quote:
Might the simplest thing to do be to install devshed IDE and then use my programs with wine directories? |
you could try Qt.
that has a fabulous IDE which works on all platforms. |
BUMP
I had to take a lot of time off for other things, but I recently got back into trying to get codeblocks working. I am now able to build and compile projects within code blocks using the GNC compiler. When I try and run them though i get this error from the console: Code:
sh: home/me/C++projects/test/untitled2: Permission denied |
Quote:
Do you have a file called home/me/C++projects/test/untitled2 ? And what does Code:
ls -lt home/me/C++projects/test/untitled2 |
Code:
me@LinuxPC:~$ cd '/home/me/C++ projects/test' I tried this: Code:
me@LinuxPC:~/mprime2511-linux64$ chmod u+x '/home/me/C++ projects/test/Untitled2' home/me/C++/ projects/test/Untitled2: 3 syntax error: ")" unexpected. Given this code: Code:
#include <iostream> http://i303.photobucket.com/albums/n...whatIwant1.png |
All times are GMT -5. The time now is 10:39 AM. |