Your own C code lives in main.c and looks like this: #include "foo.h" GCC has a bewildering array of ways of specifying these things, but let's say you are using a library foo.a which lives in the relative directory path foo/lib, and a header foo.h which lives in foo/inc.
However, complexity and defaults are two different things.A library consists of two main components - the C header files and the compiled object code archive. I fully agree, I had been cursing their terrible GUI with the compiler settings all the time. I came from VC6 to CB and remember very well how difficult that felt (even when I had been using 3rd party libs for a long time). Because almost everything else became really simple since a couple of years ago. That is sad, because if you know its so easy. I am convinced that this is the number one reason that most newbies do not stick with CB when trying it out. Most newbies tended to run into opengl as their first external lib in earlier days, maybe today thats different. MS makes it easy since you are confronted with libs and all that not before you are ready to need 3rd party libs. Most want to learn programmig not setting up build environments.
I think the point is "if" you use a 3rd party lib, whereas I think newbies typically don't. I am no mac user and so i can't Great that your questions were just allow me a comment.
Linux is simply download the rigth repo, or add a ppa and install them see: maybe you have to install binutils and gcc to start (i don't know really, but this is easy done with "sudo apt-get install binutils" and ""sudo apt-get install gcc"įor mac user the thing is a bit more difficult. If there are really "a lot" user that experience problems, maybe you can summarize them and post them here, because i really have no idea what could go wrong with this steps. Honestly: If you go to the university, make some IT lecture and you can't install a "simple" program like codeblocks, i would recommend hours of noob computer courses and not the university. # disable your anti virus software, and start brain.exe. # Don't use spaces and non ascii characters in your paths (codeblocks installation path, or your project paths/files) # if you don't know what you are doing don't install multiple compiler in parallel (for example installing the file from 1) and installing a second mingw compiler by yourself)
Settings->Compiler->Selected compiler: gnu gcc compiler -> Toolchain executables->Compiler's installation directory: $PATH TO CODEBLOCKS INSTALLATION $\MinGW -> Ok Settings->Compiler->Selected compiler: gnu gcc compiler -> Toolchain executables-> Auto-detect->OK If there is some problem with the compiler try:
it has partially to do with legacy and cross platform things, short: please use only ascii and non spaces for your paths and filenames)ĥ) Add some code and hit compile and run.Ħ) If you get a black cmd window: disable anti virus software 2) Double click on the downloaded file and install codeblocks with mingwĤ) create a new project project, without spaces in the name and some non ASCII characters (this is not difficult, and helps your it live a lot.