美好的一天!让我说我有一个编译静态库的makefile。
CC = g++
SOURCES = $(wildcard way_to_src/src/*.cpp)
INCLUDES = -Iway_to Incl
OBJECTS = $(SOURCES:.cpp=.o)
CFLAGS += $(INCLUDES)
TARGET_STATIC = libmy_.a
clean:
rm -f $(OBJECTS) $(TARGET_SO) $(TARGET_STATIC)
static : $(OBJECTS)
ar rcs $(TARGET_STATIC) $(OBJECTS)
如何添加' -fpermissive'标志编译?
答案 0 :(得分:0)
设置CXXFLAGS
:
CXXFLAGS=-fpermissive
同样CFLAGS += $(INCLUDES)
也应定位CXXFLAGS
:
CXXFLAGS += -fpermissive $(INCLUDES)