Ошибка компиляции при создании нового файла - PullRequest
0 голосов
/ 16 июня 2020

Когда я добавляю новый файл в свой проект (newfile. cpp), когда я выполняю сборку, появляется вот эта ошибка. Я просто не понимаю ...

Я использую IDE Netbeans.

Спасибо за вашу помощь

cd '/home/pi/.netbeans/remote/192.168.1.23/macbook-pro-de-thonyho.local-MacOSX-x86_64/Users/thonyho/NetBeansProjects/Kino Rocket'
    /usr/bin/make -f Makefile CONF=Debug
    "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
    make[1]: Entering directory '/home/pi/.netbeans/remote/192.168.1.23/macbook-pro-de-thonyho.local-MacOSX-x86_64/Users/thonyho/NetBeansProjects/Kino Rocket'
    "/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux/kino_rocket
    make[2]: Entering directory '/home/pi/.netbeans/remote/192.168.1.23/macbook-pro-de-thonyho.local-MacOSX-x86_64/Users/thonyho/NetBeansProjects/Kino Rocket'
    make[2]: *** No rule to make target '/Users/thonyho/NetBeansProjects/Kino Rocket/newfile.cpp', needed by 'build/Debug/GNU-Linux/_ext/4aeef0f2/newfile.o'.  Stop.
    make[2]: Leaving directory '/home/pi/.netbeans/remote/192.168.1.23/macbook-pro-de-thonyho.local-MacOSX-x86_64/Users/thonyho/NetBeansProjects/Kino Rocket'
    make[1]: *** [nbproject/Makefile-Debug.mk:60: .build-conf] Error 2
    make[1]: Leaving directory '/home/pi/.netbeans/remote/192.168.1.23/macbook-pro-de-thonyho.local-MacOSX-x86_64/Users/thonyho/NetBeansProjects/Kino Rocket'
    make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2

enter image description here

Изменить: я кое-что заметил

enter image description here

Когда я создаю localhost, у меня нет проблем, но когда я выбираю свою Raspberry Пи, у меня такая проблема ...

На консоли Raspberry, когда я ввожу эту команду, она прекрасно компилируется:

g++ -lwiringPi main.cpp newfile.cpp

Makefile-Debug.mk:

# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a -pre and a -post target defined where you can add customized code.
#
# This makefile implements configuration specific macros and targets.


# Environment
MKDIR=mkdir
CP=cp
GREP=grep
NM=nm
CCADMIN=CCadmin
RANLIB=ranlib
CC=gcc
CCC=g++
CXX=g++
FC=gfortran
AS=as

# Macros
CND_PLATFORM=GNU-Linux
CND_DLIB_EXT=so
CND_CONF=Debug
CND_DISTDIR=dist
CND_BUILDDIR=build

# Include project Makefile
include Makefile

# Object Directory
OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}

# Object Files
OBJECTFILES= \
    ${OBJECTDIR}/_ext/f637a956/newFile.o \
    ${OBJECTDIR}/main.o


# C Compiler Flags
CFLAGS=

# CC Compiler Flags
CCFLAGS=
CXXFLAGS=

# Fortran Compiler Flags
FFLAGS=

# Assembler Flags
ASFLAGS=

# Link Libraries and Options
LDLIBSOPTIONS=-lwiringPi

# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
    "${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/kinorocket

${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/kinorocket: ${OBJECTFILES}
    ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
    ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/kinorocket ${OBJECTFILES} ${LDLIBSOPTIONS}

${OBJECTDIR}/_ext/f637a956/newFile.o: /Users/Anthony/NetBeansProjects/KinoRocket/newFile.cpp nbproject/Makefile-${CND_CONF}.mk
    ${MKDIR} -p ${OBJECTDIR}/_ext/f637a956
    ${RM} "$@.d"
    $(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/f637a956/newFile.o /Users/Anthony/NetBeansProjects/KinoRocket/newFile.cpp

${OBJECTDIR}/main.o: main.cpp nbproject/Makefile-${CND_CONF}.mk
    ${MKDIR} -p ${OBJECTDIR}
    ${RM} "$@.d"
    $(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp

# Subprojects
.build-subprojects:

# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
    ${RM} -r ${CND_BUILDDIR}/${CND_CONF}

# Subprojects
.clean-subprojects:

# Enable dependency checking
.dep.inc: .depcheck-impl

include .dep.inc

Makefile:

#
#  There exist several targets which are by default empty and which can be 
#  used for execution of your targets. These targets are usually executed 
#  before and after some main targets. They are: 
#
#     .build-pre:              called before 'build' target
#     .build-post:             called after 'build' target
#     .clean-pre:              called before 'clean' target
#     .clean-post:             called after 'clean' target
#     .clobber-pre:            called before 'clobber' target
#     .clobber-post:           called after 'clobber' target
#     .all-pre:                called before 'all' target
#     .all-post:               called after 'all' target
#     .help-pre:               called before 'help' target
#     .help-post:              called after 'help' target
#
#  Targets beginning with '.' are not intended to be called on their own.
#
#  Main targets can be executed directly, and they are:
#  
#     build                    build a specific configuration
#     clean                    remove built files from a configuration
#     clobber                  remove all built files
#     all                      build all configurations
#     help                     print help mesage
#  
#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
#  .help-impl are implemented in nbproject/makefile-impl.mk.
#
#  Available make variables:
#
#     CND_BASEDIR                base directory for relative paths
#     CND_DISTDIR                default top distribution directory (build artifacts)
#     CND_BUILDDIR               default top build directory (object files, ...)
#     CONF                       name of current configuration
#     CND_PLATFORM_${CONF}       platform name (current configuration)
#     CND_ARTIFACT_DIR_${CONF}   directory of build artifact (current configuration)
#     CND_ARTIFACT_NAME_${CONF}  name of build artifact (current configuration)
#     CND_ARTIFACT_PATH_${CONF}  path to build artifact (current configuration)
#     CND_PACKAGE_DIR_${CONF}    directory of package (current configuration)
#     CND_PACKAGE_NAME_${CONF}   name of package (current configuration)
#     CND_PACKAGE_PATH_${CONF}   path to package (current configuration)
#
# NOCDDL


# Environment 
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin


# build
build: .build-post

.build-pre:
# Add your pre 'build' code here...

.build-post: .build-impl
# Add your post 'build' code here...


# clean
clean: .clean-post

.clean-pre:
# Add your pre 'clean' code here...

.clean-post: .clean-impl
# Add your post 'clean' code here...


# clobber
clobber: .clobber-post

.clobber-pre:
# Add your pre 'clobber' code here...

.clobber-post: .clobber-impl
# Add your post 'clobber' code here...


# all
all: .all-post

.all-pre:
# Add your pre 'all' code here...

.all-post: .all-impl
# Add your post 'all' code here...


# build tests
build-tests: .build-tests-post

.build-tests-pre:
# Add your pre 'build-tests' code here...

.build-tests-post: .build-tests-impl
# Add your post 'build-tests' code here...


# run tests
test: .test-post

.test-pre: build-tests
# Add your pre 'test' code here...

.test-post: .test-impl
# Add your post 'test' code here...


# help
help: .help-post

.help-pre:
# Add your pre 'help' code here...

.help-post: .help-impl
# Add your post 'help' code here...



# include project implementation makefile
include nbproject/Makefile-impl.mk

# include project make variables
include nbproject/Makefile-variables.mk
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...