User forums > Help

error: no such file or directory

(1/1)

uryyakir:
Hey,
I'm really new to code:blocks, so please treat my stupidity with forgiveness. I've recently downloaded C:B in order to use it to code C.
I've downloaded TDM-GCC to use it as a compiler, following the instructions from here: http://wiki.codeblocks.org/index.php/MinGW_installation
I've gone to Setting -> Compiler, selected the "Intel C/C++ Compiler from the list on top, and then gone to "toolchain executables", and put "C:\TDM-GCC-32\bin" as the compiler's installation directory. then, I've changed the C compiler to mingw32-gcc.exe according to the instructions. I've created a new file, saved it as "hello.c".
this is my code:

--- Code: ---#include <stdio.h>

main() {
    printf("hello, world\n");
           }

--- End code ---

When attempting to Build and Run, I receive the error:
--- Code: ---||=== Build file: "no target" in "no project" (compiler: unknown) ===|
||error: /nologo: No such file or directory|
||error: /c: No such file or directory|
||error: /FoC:\hello.obj: Invalid argument|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

--- End code ---


This is my build log:

--- Quote ---mingw32-gcc.exe: error: /nologo: No such file or directory
mingw32-gcc.exe: error: /c: No such file or directory
mingw32-gcc.exe: error: /FoC:\hello.obj: Invalid argument
Process terminated with status 1 (0 minute(s), 0 second(s))
3 error(s), 0 warning(s) (0 minute(s), 0 second(s))

--- End quote ---
Why is this happening? How can I fix it?

Thanks in advance, and sorry for bad English.
Oh and sorry if this has already been asked like a thousand times, I've dig around the internet the best I could, resulting in nothing but an headache.

Jenna:
TDM-GCC is .... GCC !  not Intel.
So you use a commandline generated for Intels C++(C-compiler together with a gcc-compiler executable. That can not work.
Use GNU GCC instead, fix the toolchain (if necessary) and set it as default compiler.

uryyakir:

--- Quote from: jens on November 13, 2016, 12:21:23 am ---TDM-GCC is .... GCC !  not Intel.
So you use a commandline generated for Intels C++(C-compiler together with a gcc-compiler executable. That can not work.
Use GNU GCC instead, fix the toolchain (if necessary) and set it as default compiler.

--- End quote ---

MY GOD. YOU FIXED MY PROBLEM. I've spent so much time on that problem and the solution was right there the entire time. Anyway, thank you so much!

Navigation

[0] Message Index

Go to full version