Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: diegojarg on November 21, 2022, 05:50:58 pm

Title: Codeblocks not detecting its own MinGW installation
Post by: diegojarg on November 21, 2022, 05:50:58 pm
Hello people.

I recently installed codeblocks-20.03-32bit-mingw-32bit-setup.exe on windows 10
It didn't autodetected its own mingw installation.

I suspect that this is not normal, nor a desired behavior.
The instructions on http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler (http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler), where not enough to solve the issue.

But I did got it solved, by doing this:
- Go to "Settings->Compiler and Debugger->Global Compiler settings->Toolchain executables"
- Change the path of MinGW from C:/MinGW to the less standard C:\Program Files (x86)\CodeBlocks\MinGW.
- Pres autodetect, and it wont work. The text entry will change back to C:/MinGW.
- Select a different compiler. I selected LLVM Clang. And press Autodetect.
- Go back to GNU GCC Compiler.
- It will warn about having changed settings. Press Yes.
- Now the text entry shows the previously setup C:\Program Files (x86)\CodeBlocks\MinGW
- Press autodetect and it works.

Title: Re: Codeblocks not detecting its own MinGW installation
Post by: stahta01 on November 21, 2022, 07:12:37 pm
If the above does not work then you might try changing the compiler installation directory to
Code
$(APP_PATH)\MinGW

Tim S.

Title: Re: Codeblocks not detecting its own MinGW installation
Post by: diegojarg on December 02, 2022, 02:25:04 am
Thank you. But I realisied that I was with the stable official release, and nightybuild is far from it. Re downloaded and it detected 3 toolchains and just picked the one installed with msys2.

This is a great IDE, but I found strange that it doesn't stores some UI setups, for example, I opened a bunch of html, javascript, css and such, in 2 editors panels. And after restarting, everything goes back to the starting point.
I had to create an empty project because there isn't another way to integrate them into the 'workspace' to save and there isn't a web-project, but the 2 editors sidebyside where not saved. But a project for any interpreted language is just a folder structure, and codeblocks build a debug&release folders as well. I will have to read much more how this workspace/project/interface works in codeblocks as it doesn't seem to go intuitive. Hands on it.
Title: Re: Codeblocks not detecting its own MinGW installation
Post by: BlueHazzard on December 05, 2022, 11:06:07 pm
For codeblocks not folders are a project but a concrete file. This brings the advantages that multiple projects can be stored in the same folder. Also if a project is a file you can check it into git or svn. This is a philosophical question with tradeoffs. Codeblocks way are project files...

>I will have to read much more how this workspace/project/interface works in codeblocks as it doesn't seem to go intuitive. Hands on it.
This is from where you come.... if you come from a web/java/eclipse/python origin, this may seem true, if you come from a c++/makefile a project file is more intuitive....
Title: Re: Codeblocks not detecting its own MinGW installation
Post by: diegojarg on December 06, 2022, 06:10:11 pm
Hi. Thanks. I know. Thats why I setup an empty project. Or simply created one and then saved the default workspace. Non of this actions keeped the dual-editor setup I had in the UI. The opened files were some html, css, js in one side, and lua, python, R in the other side, which codeblocks does a nice syntax highlighting.
In the days where everything is chrome-based, being a compiled IDE is the most lightweight and responsive than we could get, I always liked it. However for simple things like editing a javascript, I ended up getting accostumed to simpler editors like pspad, notepad++ or scite, and setting as default editor. I would just like to stay in just one tool and avoid switching from one to the other. Maybe some day.