Scott Harding - 2019-10-21

Please help me figure out what I'm doing wrong with my makefile/compile options. I'm getting this error:

Processing makefile...
--------
- Makefile Processor: C:\Program Files (x86)\Dev-Cpp\MinGW64\bin\mingw32-make.exe
- Command: mingw32-make.exe -f "C:\Users\user\Documents\Dev-C_Projects\Makefile.win" all

gcc.exe -D__DEBUG__ -c main.c -o main.o -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -g3

C:\Users\user\Documents\Dev-C_Projects\Makefile.win:28: recipe for target 'main.o' failed

mingw32-make.exe: *** [main.o] Error -1073741502

I think I have some path issues. It runs fine when I run from the command line:

``

 mingw32-make.exe -n -f Makefile.win
gcc.exe -D__DEBUG__ -c main.c -o main.o -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -g3
gcc.exe -D__DEBUG__ main.o -o Project2.exe -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib" -static-libgcc -g3

If I run each of these commands at the command line they run fine:

>gcc.exe -D__DEBUG__ -c main.c -o main.o -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -g3
 >gcc.exe -D__DEBUG__ main.o -o Project2.exe -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib" -static-libgcc -g3

but running with the makefile causes the above error. Also I have MinGW installed in C:/MinGW so how do I tell Dev-C++ to use it's own install of mingw?
ie
where gcc

C:\MinGW\bin\gcc.exe

also

where mingw32-make.exe

C:\MinGW\bin\mingw32-make.exe

I hope this makes sense. thank you.

 

Last edit: Scott Harding 2019-10-21