我發現這個問題已經發布很多次了,但沒有解決方案爲我工作,我的問題有點不同。make:g ++:error:CreateProcess:沒有這樣的文件或目錄
問題:
當使用和makefile的mingw32-化妝,我得到的錯誤:
g++: error: CreateProcess: No such file or directory
但是,如果我複製/粘貼相同的命令生成文件試圖做和將其粘貼到它的SAME命令提示符中。只有當我嘗試使用makefile構建時,纔會出現此問題。
下面是詳細信息:
g++ ./src/main.cpp ./src/application.cpp -I C:\Code\infographie\Labs\inc -L C:\Code\infographie\Labs\lib -I C:\Code\infographie\Labs\inc -g -Dmain=SDL_main -L C:\Code\infographie\Labs\lib -lmingw32 -lSDL2main -lSDL2 -o bin/debug/labs.exe
g++: error: CreateProcess: No such file or directory
makefile:23: recipe for target 'all' failed
mingw32-make: *** [all] Error 1
正如我所說的,如果我複製/粘貼,將工作的第一線。
我該怎麼辦?
更新:我已經安裝了cygwin,調整了SDL庫並重新編譯。現在我嘗試使用make時出現此錯誤。如果我複製/粘貼命令,它的工作。
g++ ./src/main.cpp ./src/application.cpp -I C:\Code\infographie\Labs\inc -L C:\Code\infographie\Labs\lib -I C:\Code\infographie\Labs\inc -g -Dmain=SDL_main -L C:\Code\infographie\Labs\lib -lcygwin -lSDL2main -lSDL2 - mwindows -o bin/debug/labs.exe
make: g++: Command not found
make: *** [makefile:23: all] Error 127
固定它,不聲明名爲PATH變量...使用MinGW的
我不是做大師,但我認爲你應該製作一個MCVE makefile,看看是否會暴露出問題。如果沒有,發佈MCVE makefile,並且賠率非常好,因爲某個make guru會發現問題。 – user4581301