项目在Netbeans中编译,但不使用MAKE

Project Compiles in Netbeans but not using MAKE

本文关键字:MAKE Netbeans 编译 项目      更新时间:2023-10-16

我有一个项目,在netbeans中使用MinGW/MSYS编译得很好,但当调用make if失败时。值得注意的是,前7行是相同的。但是,NetBeans调用make成功,从命令提示符调用make失败。什么好主意吗?

Netbeans 输出:

    ""make.exe"" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
    make.exe[1]: Entering directory `/d/Source/Project/Project.System'
    "make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/libproject.system.a
    make.exe[2]: Entering directory `/d/Source/Project/Project.System'
    mkdir -p build/Debug/MinGW-Windows/src
    rm -f build/Debug/MinGW-Windows/src/Version.o.d
    g++.exe    -c -g -Iinc -MMD -MP -MF build/Debug/MinGW-Windows/src/Version.o.d -o build/Debug/MinGW-Windows/src/Version.o src/Version.cpp
    mkdir -p build/Debug/MinGW-Windows/src
    rm -f build/Debug/MinGW-Windows/src/Process.o.d
    g++.exe    -c -g -Iinc -MMD -MP -MF build/Debug/MinGW-Windows/src/Process.o.d -o build/Debug/MinGW-Windows/src/Process.o src/Process.cpp
    mkdir -p build/Debug/MinGW-Windows/src
    rm -f build/Debug/MinGW-Windows/src/Environment.o.d
    g++.exe    -c -g -Iinc -MMD -MP -MF build/Debug/MinGW-Windows/src/Environment.o.d -o build/Debug/MinGW-Windows/src/Environment.o src/Environment.cpp
    c:mingwbinar.exe: creating dist/Debug/MinGW-Windows/libProject.system.a
    mkdir -p dist/Debug/MinGW-Windows
    rm -f dist/Debug/MinGW-Windows/libProject.system.a
    ar -rv dist/Debug/MinGW-Windows/libProject.system.a build/Debug/MinGW-Windows/src/Version.o build/Debug/MinGW-Windows/src/Process.o build/Debug/MinGW-Windows/src/Environment.o 
    a - build/Debug/MinGW-Windows/src/Version.o
    a - build/Debug/MinGW-Windows/src/Process.o
    a - build/Debug/MinGW-Windows/src/Environment.o
    ranlib dist/Debug/MinGW-Windows/libProject.system.a
    make.exe[2]: Leaving directory `/d/Source/Project/Project.System'
    make.exe[1]: Leaving directory `/d/Source/Project/Project.System'

使所有输出:

    ""make.exe"" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
    make.exe[1]: Entering directory `/d/Source/Project/Project.System'
    "make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/libproject.system.a
    make.exe[2]: Entering directory `/d/Source/Project/Project.System'
    mkdir -p build/Debug/MinGW-Windows/src
    rm -f build/Debug/MinGW-Windows/src/Version.o.d
    g++.exe    -c -g -Iinc -MMD -MP -MF build/Debug/MinGW-Windows/src/Version.o.d -o build/Debug/MinGW-Windows/src/Version.o src/Version.cpp
    g++.exe: no input files
    make.exe[2]: *** [build/Debug/MinGW-Windows/src/Version.o] Error 1
    make.exe[2]: Leaving directory `/d/Source/Project/Project.System'
    make.exe[1]: *** [.build-conf] Error 2
    make.exe[1]: Leaving directory `/d/Source/Project/Project.System'
    "make.exe": *** [.build-impl] Error 2

g++.exe -c -g - inc -MMD -MP -MF build/Debug/MinGW-Windows/src/Version.o。d -o build/Debug/MinGW-Windows/src/Versiono src/Version.cpp

g++.exe:没有输入文件

从哪里启动make all命令?好像g++找不到find "src/Version.cpp".