makefile error e=2
Hi,
Could you please look into this issue...i just created a project and trying to build this is what it is showing. i am new to the environment please dont mind
Executing task: powershell -c mingw32-make <
g++ -std=c++17 -Wall -Wextra -g -Iinclude -o output\main.exe src/main.o -Llib process_begin: CreateProcess(NULL, echo Executing all complete!, ...) failed. make (e=2): The system cannot find the file specified.mingw32-make: *** [Makefile:68: all] Error 2 The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command powershell -c mingw32-make" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
You might try to replace your current makefile with this new version: https://github.com/danielpinto8zz6/c-cpp-project-generator/blob/97a6d0d0fc73cf4da09fe9f2eeb69c19faed4c58/templates/cpp/Makefile
Please, let me know if it helps!
Hi, After the execution this is the output, may i know why is this causing, is this due to mingw folder or any other issue.
thank you for your patience.
Executing task: powershell -c mingw32-make <
mingw32-make: *** No rule to make target 'buildmain.exe'. Stop. /usr/bin/bash: line 0: type: nul: not found
/usr/bin/bash: more: command not found /usr/bin/bash: 34mMaking: command not found Creating dir: bin Creating dir: build /usr/bin/bash: line 0: type: nul: not found /usr/bin/bash: more: command not found
/usr/bin/bash: $'34mCompilator..\E[0m': command not found /usr/bin/sh: line 0: type: nul: not found
/usr/bin/sh: more: command not found /usr/bin/sh: $'35mWarning!\E[0m Attempt to handle the exception by enabling the '-Ofast' optimizer flag..': command not found /usr/bin/sh: line 0: type: nul: not found /usr/bin/sh: more: command not found mingw32-make[2]: *** No rule to make target 'buildmain.exe'. Stop. /usr/bin/sh: line 0: type: nul: not found /usr/bin/sh: more: command not found
/usr/bin/sh: $'34mCompilator..\E[0m': command not found
/usr/bin/sh: 33mExecuting: command not found /usr/bin/sh: line 0: type: nul: not found /usr/bin/sh: more: command not found /usr/bin/sh: line 0: type: nul: not found Exceptions handler failed! /usr/bin/sh: more: command not found /usr/bin/sh: $'31mâ\302\235Œ\E[0m': command not found
Terminal will be reused by tasks, press any key to close it.
That usually happens because you don't have a file called "buildmain.exe" available to make. Check that:
that file exists. you're in the right directory when you make.
https://stackoverflow.com/questions/834748/gcc-makefile-error-no-rule-to-make-target
When you try the new makefile, make sure it is located in the root directory of your project and initially try running it without changing/setting any of its parameters, values or variables. Essentially, initially at first attempt, do not edit or customize anything inside the new makefile.
Moreover, try executing the "makefile help" (mingw32-make help) to get more details on your system and copy paste or attach a schreenshot here of its printed output.
I have same issue, the new makefile doens't work for me but the old one work. Logs : `Execution of the task: powershell -c 'mingw32-make run
make[1]: *** No rules to make the target 'buildmain.exe'. Stop.
ul : not found sh : 34mMaking : not found Creation of the directory : bin Creation of directory : build
null : not found
h : 34mCompilator... : not found
ul : not found
sh : 35mWarning ! Attempt to handle the exception by setting the '-Ofast' optimization flag... : not found null : not found
make[3] : *** No rule to make target 'buildmain.exe'. Stop. null : not found
h : 34mCompilator.. : not found
make[1]: *** No rule to make target 'buildmain.exe'. Stop. null : not found
h : 34mCompilator.. : not found
ul: not found sh : 35mWarning ! Attempt to handle the exception by setting the '-Ofast' optimization flag... : not found null : not found
make[3] : *** No rule to make target 'buildmain.exe'. Stop.
null : not found
h : 34mCompilator... : not found
h : 33mExecuting : not found null : not found Execution of the executable : build\main.exe process_begin : CreateProcess(NULL, build\main.exe, ...) failed. make (e=2): The specified file cannot be found. make : *** [Makefile:513 : run] Error 2`
Reverted to old makefile, hope it's fixed now
coding the words SHELL=cmd.exe the top of in MakeFile