From a274ca06c1b2ee9e809b9a04419046208b25da48 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Mon, 26 Jan 2015 14:01:54 +0800 Subject: [PATCH] fix compile for linux --- Core/makefile | 2 +- Core/msgbus_interface.h | 2 +- template.mk | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/makefile b/Core/makefile index da8c99d..d5150b2 100644 --- a/Core/makefile +++ b/Core/makefile @@ -53,7 +53,7 @@ $(MSGBUS_SERVER_TARGET): $(MSGBUS_SERVER_OBJS_PATH) $(EVENTLOOPPOOL_OBJS_PATH) $ $(CC) -o $@ $^ $(LDFLAGS) `pkg-config --libs protobuf` $(TESTTARGET):test.cpp msgbus_handlerbase.hpp msgbus_interface.h threadpool.h xparam.hpp $(OBJDIR)/MsgHandlerMgr.o - $(CC) $(CPPFLAGS) -o $@ $< $(OBJDIR)/MsgHandlerMgr.o -lmsgbusclient -ljsoncpp $(LDFLAGS) + $(CC) $(CPPFLAGS) -o $@ $< $(OBJDIR)/MsgHandlerMgr.o -lmsgbusclient -ljsoncpp $(LDFLAGS) `pkg-config --libs protobuf` clean: -rm -f *.d $(THREADPOOL_TARGET) $(THREADPOOL_OBJS_PATH) $(EVENTLOOPPOOL_OBJS_PATH) \ diff --git a/Core/msgbus_interface.h b/Core/msgbus_interface.h index 45a7702..aa237c0 100644 --- a/Core/msgbus_interface.h +++ b/Core/msgbus_interface.h @@ -15,7 +15,7 @@ namespace NetMsgBus struct MsgBusParam { MsgBusParam() - :paramdata(NULL), + :paramdata(), paramlen(0) { } diff --git a/template.mk b/template.mk index df58e36..08ab62b 100644 --- a/template.mk +++ b/template.mk @@ -14,10 +14,10 @@ PBCC := protoc PBCCFLAGS := --cpp_out=. ifeq ($(BUILD),release) # for release version -CPPFLAGS := -O3 -g -DNDEBUG -D__STDC_FORMAT_MACROS -fPIC -I/usr/local/Cellar/boost/1.46.0/include +CPPFLAGS := -O3 -g -DNDEBUG -D__STDC_FORMAT_MACROS -fPIC -I$(BOOST_ROOT) else # for debug version -CPPFLAGS := -O0 -D__STDC_FORMAT_MACROS -Wall -fPIC -g -pg -I/usr/local/Cellar/boost/1.46.0/include +CPPFLAGS := -O0 -D__STDC_FORMAT_MACROS -Wall -fPIC -g -pg -I$(BOOST_ROOT) endif LDFLAGS := -L. -L$(BINDIR) -L$(LIBDIR) -Wl,-rpath,./ -Wl,-rpath-link,$(SHELLROOT)/$(BINDIR):$(SHELLROOT)/$(LIBDIR) SHARED := -shared