Hello! I just got my book and trying to run ex1 make file.
I get the following error:
mingw32-make: ex1: No such file or directory
cc ex1.c -o ex1
process_begin: CreateProcess(NULL, cc ex1.c -o ex1, ...) failed.
make (e=2): The system cannot find the file specified.
<builtin>: recipe for target 'ex1' failed
mingw32-make: *** [ex1] Error 2
When I go to check the compiler with the gcc -v command, I get the following:
Can you show the make file and your directory?
Have you tried changing the order of the compiler args? Try cc -o ./ex1 ./ex1.c, just to make sure that’s not the issue.
What’s your setup, mingw-32 on Windows?
cc ex1.c -o ex1
process_begin: CreateProcess(NULL, cc ex1.c -o ex1, ...) failed.
make (e=2): The system cannot find the file specified.
<builtin>: recipe for target 'ex1' failed
make: *** [ex1] Error 2
If you don’t get it to work with mingw I encourage you to try running Ubuntu on the Windows subsystem for Linux. I think that’s a much better option now that wasn’t available when the book was written.
Also, Visual Studio comes with a native C/C++ compiler for Windows. You could check out Visual Studio build tools. But beware that this will be a very different environment with a bit of an additional learning curve.
Thanks. I know I can get Dev C++ to compile. I was just trying to not use an IDE like the preface suggested. I’ll continue the book with that unless/until I come to a place I can’t use it. Thanks for sticking with me through the conversation.