User forums > Using Code::Blocks

Code Blocks does not compile

<< < (2/3) > >>

Miguel Gimenez:
Do you have two compilers installed, say one in C:\mingw and other under C::B installation folder?
Can you post the value of the path variable (open a console, write "path" without the quotes and press enter).
Can you take a snapshot of the compiler configuration in Settings -> Compiler -> Toolchain executables

Schragner:
I only have one compiler, the standard one.
I  don't know where to put "path", because I have only used C::B for a specific reason.

Miguel Gimenez:
Consoles are from Windows, and they can be opened using Windows key + R and writing "cmd"

You can try changing the mingw32.. file names in "Toolchain executables" (using the button with three dots) to just gcc.exe and g++.exe.

If this does not work, uninstall C::B and the compiler and install 20.03.

Schragner:
I have tried changing the file names to both of those, yet it still doesn't work. I am hopeless that anything will work. I need specifically the 16.01 version, and I don't know what to do. I have even considered buying a new laptop.

gd_on:
Three things to try :

* I know that with some old versions of gcc tools, there is a problem with spaces inside the path of a file. In  "C:\Users\Administrator\Documents\New folder\168\main.cpp" there is a space between "New" and "folder". Generally, when using MinGW, avoid spaces in the path names. There are still some old utilities in MinGW set of tools which don't like spaces.
* In your path variable, to be able to execute an exe file built with MinGW, you should add path like C:\OJI\codeblocks\MINGW\bin" (in your case). This path is necessary if you try to execute your .exe outside codeblocks : codeblocks adds this for its own usage (so when you use the Run icon for example). But if you use directly your exeutable in a console, it may need access to some dll inside ...MinGW\bin.
* Your main.cpp path suggests that you are Administrator. If it's not the case, you have not the right priviledges. So move your code in an other place where you have the good rights
Buying a new laptop? It's up to you, but I really doubt that this is the problem !

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version