这是一个关于具体情况的问题,与IT技术有关。以下是内容:
当我运行这个程序时,出现了以下错误:
我需要做什么才能让libSymbolXLib识别通用构建规则?
如果这不够清楚,请告诉我。
更新 使用:
这是我目前拥有的:
SRC = \
CartoCursor.cpp \
CartoOperatorFactory.cpp \
CurveHelper.cpp \
$(NULL)
CXX = g++
CC_FLAGS = -fPIC -Wall
SYMB_OBJ_DIR = ./obj/symb_obj
SYMB_X_INCLUDE = -I../../../MYLIBS
SYMB_X_OBJS = $(SRC:%.cpp=$(SYMB_OBJ_DIR)/%.o)
all : libSymbolXLib.a
libSymbolXLib.a : $(SYMB_X_OBJS)
rm -f $@
$(SYMB_OBJ_DIR)/%.o : %.cpp
$(CXX) -c $(CC_FLAGS) $(SYMB_X_INCLUDE) -o $(INT_DIR)/$*.o $?
当我运行这个程序时,出现了以下错误:
make[1]: *** No rule to make target `obj/symb_obj/CartoCursor.o', needed by `libSymbolXLib.a'. Stop.
我需要做什么才能让libSymbolXLib识别通用构建规则?
如果这不够清楚,请告诉我。
更新 使用:
CXX = g++
CC_FLAGS = -fPIC -Wall
SYMB_OBJ_DIR = ./obj/symb_obj
SYMB_X_INCLUDE = -I../../../MYLIBS
SYMB_X_OBJS = $(SRC:%.cpp=$(SYMB_OBJ_DIR)/%.o)
all : libSymbolXLib.a
libSymbolXLib.a : $(SYMB_X_OBJS)
ar rcs $@ $^
$(SYMB_OBJ_DIR)/%.o : %.cpp
$(CXX) -c $(CC_FLAGS) $(SYMB_X_INCLUDE) -o $@ $
[mehoggan@hogganz400 Core]$ make
mkdir -p ./libs
mkdir -p ./obj/symb_obj
make -f ./Graphic/SymbolXLib/Makefile
make[1]: Entering directory `/home/mehoggan/arcgis-new/GraphicsCore_Dev/Runtime/Core'
make[1]: *** No rule to make target `obj/symb_obj/CartoCursor.o', needed by `libSymbolXLib.a'. Stop.
make[1]: Leaving directory `/home/mehoggan/arcgis-new/GraphicsCore_Dev/Runtime/Core'
make: *** [build_symbol_x_lib] Error 2
[mehoggan@hogganz400 Core]$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-redhat-linux-gnu
[mehoggan@hogganz400 Core]$ uname -a
Linux hogganz400.esri.com 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[mehoggan@hogganz400 Core]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)
[mehoggan@hogganz400 Core]$
SYMB_OBJ_DIR
的./
前缀吗? - Joe