News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Code::Blocks not finding compiler on Windows 10

Started by cluelessnoob, September 08, 2019, 10:15:13 PM

Previous topic - Next topic

cluelessnoob

I installed Code::Blocks on Windows 10 and am trying to use this compiler:

https://www.allegro.cc/forums/thread/617424

When I open Code::Blocks, I get a gcc compiler not found error. I followed these instructions:

https://www.bleepingcomputer.com/forums/t/641797/codeblocks-environment-error/

no help. I checked my environmental path and everything looks right. I opened a command window and typed "gcc" and got a "gcc: fatal error: no input files. GCC terminated" error, telling me the compiler is working. I am able to compile from the command line. Any ideas?

stahta01

#1
What is the path to the GCC Compiler?
Did you configure Code::Blocks to use that path?
Remember C::B adds the bin folder so do not include it in the path!

Verify the tools use the same names as in Code::Blocks (Change the C::B setting to match your compiler)

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

cluelessnoob

Thanks for the help. I used the browse function [...] in the toolchains executables tab to browse to the mingw folder. I took screen shots of the settings in Code::Blocks and the path to the mingw folder in Windows but the files are too large to attach. Everything looks right to me.

stahta01

If you refuse to answer questions, there is no way to help you.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

cluelessnoob

#4
The path to the compiler is "C:\ MINGW\i686-8.1.0-posix-dwarf-rt-v6_rev\mingw32." The compiler is set as GNU GCC compiler.

Per these instructions: https://www.bleepingcomputer.com/forums/t/641797/codeblocks-environment-error/, under the settings tab, selecting the compiler option and looking under the toolchains tab, Code::Blocks should set the path to the compiler automatically. The autoconfigure function does not find the path. The attached file shows the settings in Code::Blocks. Also per the instructions, the path can be manually and I used the browse key to set the path. Attached is a screenshot. Is there another way to set the compiler other than under the toolchains executables tab?

stahta01

What are the filenames for the C and C++ compilers?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

cluelessnoob

#6
I see what you are saying. I went into the bin folder under the mingw32 directory and manually selected the proper files. Attached is a screenshot with the corrected settings, for future generations. Thanks.

stahta01

So, you changed your mind about what compiler you are going to use.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]