-1

make 中に次のエラーが発生します。

In file included from modGPRS.c:25:
../inc/intModGPRS.h:33:21: error: datapkt.h: No such file or directory

ディレクトリ構造は次のとおりです。 datapkt.h は に配置されmain_proj/libs/ipsec/itfます。

libsフォルダーには、次のような Makefile があります。

include $(BUILD_TOP)/build_control/stream/config.mk

SUBDIRS = tracing config stats srandom

SUBDIRS_$(B_HAS_EEPROM) += eeprom
SUBDIRS_$(B_LIBARCHIVE) += libarchive
ifeq ($(B_PLATFORM_openat),y)
    SUBDIRS += openat openssl asn1c mib zlib diff ipsec
else
    SUBDIRS += iniparser daemon ipsec
endif

stats_needs      = config

include $(BUILD_TOP)/build_control/stream/subdirs.mk

の Makefileipsecは次のとおりです。

SDIRS += src itf
TOP?=..
RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
                    (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
                    $(MAKE) -e TOP=$(TOP)/.. $$target INCLUDES='$(INCLUDES)') || exit 1; \
                done;

subdirs:
        @target=all; $(RECURSIVE_MAKE)

all: subdirs -I /itf

include $(BUILD_TOP)/build_control/stream/subdirs.mk

また、subdirs.mkは次のとおりです。

#   This is a stand-alone file to distribute targets to
#   sub-directories. Include this file alone.  

#  Make bug: It loses track of if/endif over a $(eval) call.
ifndef __subdirs_include
__subdirs_include = yes

#   This only works for the standard targets defined in $(TARGETS)
#   in utils.mk. However this list can be extended with +=.

install:: install-hdrs

include $(BUILD_TOP)/build_control/stream/utils.mk
include $(BUILD_TOP)/build_control/stream/platform.mk

#  This creates a recursion rule for each pair of target and subdirectory.
#  The target for doing T in directory D is named T+D. 
#  If there is a "$(D_needs) = subdirs" then the subdirs become prerequisites
#  of D.
define __target_subdir
.PHONY:: $(1)+$(2)
$(1)+$(2) :: $(3); +$(MAKE) -C $(2) $(1)
endef

$(foreach t,$(TARGETS),\
    $(foreach d,$(strip $(SUBDIRS) $(SUBDIRS_y)),\
        $(eval $(call __target_subdir,$(t),$(d),$(patsubst %,$(t)+%,$($(d)_needs))))))

$(foreach t,$(TARGETS),\
    $(foreach d,$(strip $(SUBDIRS) $(SUBDIRS_y)),$(eval $(t)::$(t)+$(d))))


endif # __subdirs_include

ヘッダー ファイル datapkt.h の問題を解決する方法を教えてください。他に詳細が必要な場合はお知らせください。

ありがとうサニー

4

1 に答える 1

-1

エラー メッセージはコンパイラからのものです。ファイル(ファイルが存在するディレクトリにある場合はAmodGPRS.cと呼びます)にファイル が含まれており、それ自体が というファイルをインクルードしようとしていますが、見つかりません。これは、makefile がファイルの場所をコンパイラに正しく伝えていないか、または (より可能性が高い) 必要なライブラリをインストールしていないことが原因です。A/../inc/intModGPRS.hdatapkt.hdatapkt.h

ビルドしようとしているものが何であれ、ビルドを試みる前に、インストールする必要があるものをすべてインストールしたことを確認してください。少なくとも、何をインストールしようとしているのかを教えてくれなければ、これ以上お手伝いすることはできません。

于 2013-06-21T21:00:20.660 に答える