User forums > Help

Wont Build C code

(1/5) > >>

Rich_P:
HI All,

Im a newbie on here and to C, im learning from a book and woujld like to use CodeBlocks to compile the simple programs outlined in the book,

I keep getting this error when trying to build

Execution of 'mingw32-g++.exe  -o C:\simple\Simple2.exe C:\simple\Simple2.o' in 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\CodeBlocks' failed.

I hope someone can help

Rich

BlueHazzard:
Hello!
What installer did you use?
Have you installed a compiler?
Is the path in "Settings-> Compiler -> Toolchain executables" correct?

Rich_P:
Hi, thanks for the reply,

I havnt installed a separate compiler, i downloaded the entire insall from Code::Blocks and assumed the compilers were included?

The compilers installation directory has C:MinGW set,
Under the toolchain variables it has mingw32-gcc.exe in the C compiler list

Hope this helps to explain my situation

Rich

BlueHazzard:
Did you installed
codeblocks-12.11-setup.exe
or
codeblocks-12.11mingw-setup.exe
?

if you installed codeblocks-12.11-setup.exe then uninstall and use codeblocks-12.11mingw-setup.exe instead. Or install the gcc from http://tdm-gcc.tdragon.net/

if you have installed codeblocks-12.11mingw-setup.exe:
Is there a mingw32-gcc.exe on your system? If not reinstall.
otherwise point the compilers installation directory to the location of your mingw32-gcc

Rich_P:
I had the wrong one installed, so i have installed the correct one and have this issue now

Execution of 'mingw32-g++.exe  -o "C:\simple\Simple 3.exe" "C:\simple\Simple 3.o"' in 'C:\Users\richardpel\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\CodeBlocks' failed.

i selected "C" as my starting langueage but it seems to want to build it using the g++ compiler ? and not gcc?
I have checked int he folder that C::B is pointing to for its compiler and there is the ming32-gcc.exe

im stumped,

thanks

Rich

Navigation

[0] Message Index

[#] Next page

Go to full version