![]() |
|
Compiling Connector - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196) +---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192) +---- Thread: Compiling Connector (/showthread.php?tid=3310) Pages:
1
2
|
- WorldOfWars - 03-04-2015 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 ![]() - ZaTii - 03-04-2015 did u included boost? cause the define is from boost in a hpp file. Include the whole boost folder and it should work - WorldOfWars - 03-04-2015 I included, like you can see there - Karmel - 03-04-2015 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. - Sickness - 03-05-2015 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. - ZaTii - 03-05-2015 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. - Nikolee - 03-05-2015 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. - Wizatek - 03-05-2015 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 - Nikolee - 03-05-2015 ^ 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.. - WorldOfWars - 03-05-2015 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 ! |