Author Topic: Easy instructions for installing Nightly build in Windows  (Read 1822 times)

Offline mannisp

  • Single posting newcomer
  • *
  • Posts: 5
Easy instructions for installing Nightly build in Windows
« on: October 28, 2024, 12:31:42 am »
Yeah I know there are already some kind of instructions for how to install nightly builds in this forum; however, for a beginner they are not very clear and it was written in year 2006 A.D. so there is some old info, that makes you wonder if they still apply. But most importantly, there are no instructions for installing MinGW compiler and getting it configured.
So, I decided to write down the steps, not only to make it easier for a new guy but also to make notes to myself, since after four years when I next time need to install a new PC I won't remember all this anymore.

So, in Nightly builds thread you should select the latest build, unless a miracle has happened and some recent version has been marked as a stable version. Normally this does not happen so the best bet is to use the latest.
In each post there are links for at least three zip downloads (from SourceForge) + probably a link to GitHub for the used MinGW compiler. At first time you need to get all of them.
Zips (7z) needed are:
1. CB_blahblah... (CodeBlocks itself)
2. Mingw... (Mingw dll's needed by CodeBlocks; this is not the compiler!)
3. wxmsw... (wxWidget dll's)
And at first time, or for updating the compiler version:
4. MinGW compiler package from GitHub.

Extract CB zip to a folder whatever you like; I put it in c:\Program Files\Codeblocks.
Extract also abovementioned zips 2 and 3 to the same Codeblocks folder.
Now your Codeblocks is basically installed. You may create a shortcut to codeblocks.exe that exists in Codeblocks folder.

Then install the compiler:

Extract MinGW package to another folder. Now, there's a possibility to use the folder name that is set as default in CodeBlocks: c:\mingw-w64\mingw64. However, there's no guarantee the default is always that and besides at least I don't like occupying root directly with application specific folders. So, just put it anywhere you like.

Set PATH from Windows system environment variable to include bin folder that exists in this MinGW folder. Note, you have to do this also if you used default folder name, in which case the path is c:\mingw-w64\mingw64\bin. If you don't know how to set PATH variable check google.

When you start CodeBlocks first time, it autodetects compilers, and obviously it does not find MinGW if it is not in default folder. But it is ok, just continue. Go to Settings->Compiler menu:
- Set Selected compiler to GNU GCC MinGW64 Compiler and click Set as default.
- Under Search directories change directory names for Compiler Policy and Linker Policy.
- Under Toolchain executables change Compiler's installation directory.
You are ready!