C Hello world: Code Blocks IDE, MinGW C compiler on windows -
i can't code blocks ide compile hello world c program creates when create new c project. i've installed mingw , recognised ide. when try build following output:
-------------- build: debug in testc3 (compiler: gnu gcc compiler)--------------- mingw32-gcc.exe -wall -g -c c:\users\jody\codeblocks\testc3\testc3\main.c -o obj\debug\main.o mingw32-g++.exe -o bin\debug\testc3.exe obj\debug\main.o execution of 'mingw32-g++.exe -o bin\debug\testc3.exe obj\debug\main.o' in 'c:\users\jody\codeblocks\testc3\testc3' failed.
why trying run mingw32-g++.exe
mingw32-gcc.exe
? (and if shouldn't doing this, how can configure not to?)
the mingw32-gcc.exe
step compile step. mingw32-g++.exe
link step. correct sequence , work if mingw32
installation "normal" , correct - "normal" means have installed c++ c tools.
the link step failing because mingw32-g++.exe
cannot executed, because not exist on path
. try running mingw32-g++.exe
@ command prompt check. in directory mingw32-gcc.exe
resides see if mingw32-g++.exe
there.
if mingw32 installation has got broken somehow suggest uninstall , reinstall.
if have intentionally installed c tools explain seeing, , fixed:
both mingw32-gcc.exe
, mingw32-g++.exe
tool driver programs. when invoked compilation options .c
files, mingw32-gcc.exe
invokes c compiler. when invoked compilation options .cpp|cxx|...
files, mingw32-g++.exe
invokes c++ compiler. if either of them invoked linkage options invokes linker.
codeblocks default configures mingw32-g++.exe
invoke linker because equally c projects, c++ projects , c/c++ projects, , assumes have full c/c++ toolchain.
if have not installed c++ tools , want build c, can use mingw32-gcc.exe
invoke both c compiler , linker. configure in codeblocks ide:
- navigate settings -> compiler
- ensure selected compiler
gnu gcc
- tab toolchain executables
- change linker dynamic libs
mingw32-g++.exe
mingw32-gcc.exe
- ok out of settings , rebuild project.
Comments
Post a Comment