Compiling Connector
#1

Hello,

 

i started to learn to compile files. I'm using Microsoft Visual Studio 12.0.

 

I've fixed somes errors (missed files) , but now i got this error : 

 

Error 2 error C3861: 'gettimeofday': identifier not found f:\project 2015\lc_source\connector\utils.cpp 306 1 Connector
 
here is a screen of the function.
 

 
the code : 
 

void GetTimeofDay(struct timeval *t, struct timezone* dummy)
{
#ifdef CIRCLE_WINDOWS
unsigned long millisec = GetTickCount();
t->tv_sec = (int)(millisec / 1000);
t->tv_usec = (millisec % 1000) * 1000;
#else
gettimeofday(t, dummy);
#endif
}

Thanks for help Smile
#2
did u included boost? cause the define is from boost in a hpp file. Include the whole boost folder and it should work

#3

I included, like you can see there 

 

#4

If you trying to compile it for windows you should use CIRCLE_WINDOWS

gettimeofday is from linux library, you can find more here: 2

or just use equivalent:2

2

2

 

Google is your friend.

#5

There's your first issue. You are combining linux based game on windows.

Second issue is it looks like you are compiling under debug. 

 

If you want a proper server you need to compile under linux.

#6


I included, like you can see there 

 

is the file : chrono.hpp in boost/chrono/detail/inlined/mac/ ? 

 

There's your first issue. You are combining linux based game on windows.

Second issue is it looks like you are compiling under debug. 

 

If you want a proper server you need to compile under linux.

 

 

The compile works without a problem and the server. But yes for real hosting linux and release compile is the best option.

#7
u have to compile first the sharelib and then the other. Also you will need log4cxx to compile yourself and thats much googlin if you dont know how.

#8


If you trying to compile it for windows you should use CIRCLE_WINDOWS

gettimeofday is from linux library, you can find more here: 2

or just use equivalent:2

2

2

 

Google is your friend.

^ the only right answer to your problem, in this thread

#9

^ the only right answer to your problem, in this thread

 

Its confusing me, why he havent defined windows, i just opened the Server Project and just had to add the missing libs..

#10

Hello,

 

thanks all for answer.

 

After some google search, i found a part of code : 

#ifdef WIN32
#include <time.h>
#include <sys/timeb.h>
int gettimeofday (struct timeval *tp, void *tz)
{
struct _timeb timebuffer;
_ftime (&timebuffer);
tp->tv_sec = timebuffer.time;
tp->tv_usec = timebuffer.millitm * 1000;
return 0;
}
#endif

Now, another error , Error 3 error C3861: 'strcasecmp': identifier not found .

 

i'll search on google !



Forum Jump:


Users browsing this thread: 1 Guest(s)