Xsocket build fail with xcode 6

Hi Guy.
I clone code from github and build ok on Win32 and Android. But Fail in xcode 6.

  • in header:

    #include “network/WebSocket.h”
    #include “json/rapidjson.h”
    #include “json/document.h”
    #include “json/stringbuffer.h”
    #include “json/writer.h”

    class SWebSocket : public cocos2d::network::WebSocket::Delegate
    {
    private:
    std::string _url;
    cocos2d::network::WebSocket* _websocket;
    public:
    static SWebSocket* create(std::string url);

    ///some virtual
    }

In .cpp

SWebSocket* SWebSocket::create(std::string url)
{
	SWebSocket* ws = new SWebSocket(url);
	ws->_websocket = new cocos2d::network::WebSocket();
	return ws;
}

The problem is:

  • In win32, android =>OK.

  • in IOS, I got error:

    duplicate symbol _llvm.cmdline in:
    /…/Debug-inphonesimulator/libcocos2d iOs.a(pollfd.c.o)
    … iOs.a(base64-decode.c.o)…
    …30 duplicae symbols for architectur x86_64

But when i remove the code:

ws->_websocket = new cocos2d::network::WebSocket();

It build OK.

does anyone have suggestion for me, many thanks.

No one get same problem to me …

Thanks All.
I have solved problem by updae xcode to 7.