Most of the compiling errors I saw with this problem were on windows using MinGW I am not.
I am using FreeBSD 10.2 stable, gcc 5, c++14.
Below is the error code that is kicked out.
src/map/message.cpp:445:23: error: 'to_string' is not a member of 'std'
server.append(std::to_string(chatPort));
Here is the actual code of that line and a few after it.
string_t server = "tcp://";
server.append(chatIp);
server.append(":");
server.append(std::to_string(chatPort));
Here is the header file
#include "../common/socket.h"
#include "../common/sql.h"
#include "../common/mmo.h"
#include <zmq.hpp>
#include "../common/cbasetypes.h"
class CBasicPacket;
struct chat_message_t
{
zmq::message_t* type;
zmq::message_t* data;
zmq::message_t* packet;
};
namespace message
{
void init(const char* chatIp, uint16 chatPort);
void send(MSGSERVTYPE type, void* data, size_t datalen, CBasicPacket* packet);
void close();
};
Any ideas or help would be greatly appreciated!
Thanks in advance.
Edited Below*
This is my Makefile.am now
## Set automake options
AUTOMAKE_OPTIONS=foreign
## Gather sourcelist
include sources.am
## Set up all of our dependency flags
SRC_ALL = $(SRC_DARKSTAR)
CFLAGS_ALL = $(DARKSTAR_CFLAGS)
CPPFLAGS_ALL = $(DARKSTAR_CPPFLAGS)
CXXFLAGS_ALL = $(DARKSTAR_CXXFLAGS)
LIBS_ALL = $(DARKSTAR_LIBS)
LDFLAGS_ALL = $(DARKSTAR_LDFLAGS)
CXX = g++5 -std=c++14
CC = gcc5
CPP = gcc5 -E
CFLAGS_ALL += -std=gnu++14
CFLAGS_ALL += -std=c++14
CFLAGS_ALL += $(LUA_CFLAGS)
CFLAGS_ALL += $(MYSQL_CFLAGS)
LIBS_ALL += $(LUA_LIBS)
LIBS_ALL += $(MYSQL_LDFLAGS)
LIBS_ALL += -lzmq
## Add Architecture-specific stuff
if DARKSTAR_ARCH_LINUX
LIBS_ALL += -ldl
endif
if DARKSTAR_ARCH_SOLARIS
LIBS_ALL += -lsocket -lnsl -ldl
endif
if DARKSTAR_ARCH_FREEBSD
CPPFLAGS_ALL += -D__FREEBSD__
endif
if DARKSTAR_ARCH_NETBSD
CPPFLAGS_ALL += -D__NETBSD__
endif
if DARKSTAR_ARCH_WIN32
CPPFLAGS_ALL += -DFD_SETSIZE=4096 -DCYGWIN
endif
## Targets
bin_PROGRAMS = dsgame dsconnect dssearch
dsgame_SOURCES = $(SRC_ALL) $(SRC_MAP)
dsgame_CXXFLAGS = $(CFLAGS_ALL) $(CXXFLAGS_ALL)
dsgame_CPPFLAGS = $(CPPFLAGS_ALL) -DdsUDPSERV
dsgame_CFLAGS = $(CFLAGS_ALL)
dsgame_LDFLAGS = $(LDFLAGS_ALL)
dsgame_LDADD = $(LIBS_ALL)
dsconnect_SOURCES = $(SRC_ALL) $(SRC_LOGIN)
dsconnect_CXXFLAGS = $(CFLAGS_ALL) $(CXXFLAGS_ALL)
dsconnect_CPPFLAGS = $(CPPFLAGS_ALL) -DdsTCPSERV
dsconnect_CFLAGS = $(CFLAGS_ALL)
dsconnect_LDFLAGS = $(LDFLAGS_ALL)
dsconnect_LDADD = $(LIBS_ALL)
dssearch_SOURCES = $(SRC_SEARCH_COMMON) $(SRC_SEARCH)
dssearch_CXXFLAGS = $(CFLAGS_ALL) $(CXXFLAGS_ALL)
dssearch_CPPFLAGS = $(CPPFLAGS_ALL)
dssearch_CFLAGS = $(CFLAGS_ALL)
dssearch_LDFLAGS = $(LDFLAGS_ALL)
dssearch_LDADD = $(LIBS_ALL)