Skip to content

Commit

Permalink
fix compile for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
absolute8511 committed Jan 26, 2015
1 parent 242ec58 commit a274ca0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Core/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
2 changes: 1 addition & 1 deletion Core/msgbus_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace NetMsgBus
struct MsgBusParam
{
MsgBusParam()
:paramdata(NULL),
:paramdata(),
paramlen(0)
{
}
Expand Down
4 changes: 2 additions & 2 deletions template.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a274ca0

Please sign in to comment.