IISkillzII 2 Posted November 5, 2015 Share Posted November 5, 2015 utils.cpp:243: warning: NULL used in arithmeticutils.cpp:255: warning: NULL used in arithmeticutils.cpp:269: warning: NULL used in arithmeticcompile war_map.cppcompile wedding.cppcompile xmas_event.cppg++: directory": No such file or directory<command-line>: warning: missing terminating " characterversion.cpp:10: error: missing terminating " characterversion.cpp: In function 'void WriteVersion()':version.cpp:10: error: expected primary-expression before ')' tokencompile panama.cppgmake: *** [OBJDIR/version.o] Error 1gmake: *** Waiting for unfinished jobs.... Makefile : PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1) GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1)BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)SVN_VERSION = $(shell svnversion -n .) CC = g++ INCDIR =LIBDIR =BINDIR = ..OBJDIR = OBJDIR$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi) # Standard SettingLIBS = -pthread -lm -lmd# Removed -fno-rttiCFLAGS = -g -Wall -O2 -m32 -pipe -fexceptions -D_THREAD_SAFE -DNDEBUG # -D_USE_SERVER_KEY_ ifeq ($(GCC_VERSION), 4)CFLAGS += -mtune=i686 -fstack-protector-allelseCFLAGS += -mcpu=i686endif # boostINCDIR += -I../../../Extern/include/boost # DevILINCDIR += -I../../libdevilLIBDIR += -L../../libdevilLIBS += -lIL -lpng -ltiff -lmng -llcms -ljpeg # MySQLifeq ($(BSD_VERSION), 7)INCDIR += -I../../libmysql/7.x-5.1.35LIBDIR += -L../../libmysql/7.x-5.1.35elseINCDIR += -I../../libmysql/5.x-5.1.35LIBDIR += -L../../libmysql/5.x-5.1.35endif LIBS += -lmysqlclient -lz # Miscellaneous external librariesINCDIR += -I../../../Extern/includeLIBDIR += -L../../../Extern/libLIBS += -lcryptopp -lgtest # HackShieldINCDIR += -I../../libhackshield/includeLIBDIR += -L../../libhackshield/libLIBS += -lanticpxsvr # XTrapINCDIR += -I../../libxtrap/include # openssl#INCDIR += -I/usr/include#LIBS += -lssl#LIBS += /usr/lib/libssl.a # Project LibraryINCDIR += -I../../liblua/includeINCDIR += -I/usr/local/includeINCDIR += -I../../libserverkeyLIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../liblua/lib -L../../libserverkeyLIBDIR += -L/usr/local/libLIBS += -lthecore -lpoly -llua -llualib -lsql -lgame -lserverkeyUSE_STACKTRACE = 0ifeq ($(USE_STACKTRACE), 1)LIBS += /usr/local/lib/libexecinfo.aendif TARGET = $(BINDIR)/game_r$(SVN_VERSION)_$(PLATFORM) CFILE = minilzo.c CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\ arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\ char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\ char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\ cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\ desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\ entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\ guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\ input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\ item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\ locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\ messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\ party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\ questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\ questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\ questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\ questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\ questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\ refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\ skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\ wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\ BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\ HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\ SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\ auction_manager.cpp FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\ buff_on_attributes.cpp check_server.cpp dragon_soul_table.cpp DragonSoul.cpp\ group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\ shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp COBJS = $(CFILE:%.c=$(OBJDIR)/%.o)CPPOBJS = $(CPPFILE:%.cpp=$(OBJDIR)/%.o) MAINOBJ = $(OBJDIR)/main.oMAINCPP = main.cpp TESTOBJ = $(OBJDIR)/test.oTESTCPP = test.cppTEST_TARGET = $(BINDIR)/test default: $(TARGET) $(TEST_TARGET) $(OBJDIR)/minilzo.o: minilzo.c @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ @echo compile $< $(OBJDIR)/version.o: version.cpp @$(CC) $(CFLAGS) -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__SVN_VERSION__=\"$(SVN_VERSION)\" -c $< -o $@ @echo compile $< $(OBJDIR)/%.o: %.cpp @echo compile $< @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ limit_time: @echo update limit time @python update_limit_time.py $(TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ) @echo linking $(TARGET).... @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(TARGET) $(TEST_TARGET): $(TESTCPP) $(CPPOBJS) $(COBJS) $(TESTOBJ) @echo linking $(TEST_TARGET) @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(TESTOBJ) $(LIBS) -o ../test clean: @rm -f $(COBJS) $(CPPOBJS) @rm -f $(BINDIR)/game_r* $(BINDIR)/conv tag: ctags *.cpp *.h *.c dep: makedepend -f Depend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) $(TESTCPP) 2> /dev/null > Depend sinclude Depend version.cpp #include <stdio.h> void WriteVersion(){#ifndef __WIN32__ FILE* fp = fopen("ver.txt", "w"); if (fp) { fprintf(fp, "emulated game server revision: %s\n", __SVN_VERSION__); //fprintf(fp, "%s@%s:%s\n", __USER__, __HOSTNAME__, __PWD__); fclose(fp); }#endif} Link to comment Share on other sites More sharing options...
Ken 904 Posted November 5, 2015 Share Posted November 5, 2015 #include <stdio.h> void WriteVersion() { if ((FILE * fp = fopen("version.txt", "w"))) { fprintf(fp, "Emulated game server version: 40250"); fclose(fp); } } Makefile: $(OBJDIR)/version.o: version.cpp @$(CC) $(CFLAGS) -c $< -o $@ @echo compile $< Kind Regards ~ Ken Do not be sorry, be better. Link to comment Share on other sites More sharing options...
IISkillzII 2 Posted November 5, 2015 Author Share Posted November 5, 2015 Now version.cpp:10:2: warning: no newline at end of fileversion.cpp: In function 'void WriteVersion()':version.cpp:5: error: expected primary-expression before '*' tokenversion.cpp:5: error: 'fp' was not declared in this scopegmake: *** [OBJDIR/version.o] Error 1gmake: *** Waiting for unfinished jobs....root@host:~/mainline_released/mainline_sg/Srcs/Server/game/src # Link to comment Share on other sites More sharing options...
Active Member Koray 2001 Posted November 5, 2015 Active Member Share Posted November 5, 2015 if ((FILE * fp = fopen("version.txt", "w"))) Perfect.. SVN_VERSION = $(shell svnversion -n .) Change with svn version like SVN_VERSION = 40250 1 Link to comment Share on other sites More sharing options...
IISkillzII 2 Posted November 5, 2015 Author Share Posted November 5, 2015 same error Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7178 Posted November 5, 2015 Honorable Member Share Posted November 5, 2015 (edited) Makefile (lil clean) (game/src/) version.cpp (lazy way) (if you don't mind having no ver.txt at every game start up) What does the compiler print after this? (whole text) The default code is "ok" too, but probably it couldn't evalue __SVN_VERSION__ since you didn't have svn installed. #include <stdio.h> void WriteVersion() { #ifndef __WIN32__ FILE* fp = fopen("ver.txt", "w"); if (fp) { fprintf(fp, "emulated game server revision: %s\n", __SVN_VERSION__); //fprintf(fp, "%s@%s:%s\n", __USER__, __HOSTNAME__, __PWD__); fclose(fp); } #endif } Edited November 5, 2015 by martysama0134 Check out my GitHub Link to comment Share on other sites More sharing options...
Ken 904 Posted November 5, 2015 Share Posted November 5, 2015 if ((FILE * fp = fopen("version.txt", "w"))) Perfect.. HWND chromeswnd = FindWindowA("Chrome_WidgetWin_1", NULL); HWND skypeswnd = FindWindowA("tSkMainForm", NULL); HWND teamvw = FindWindowA("#32770", "TeamViewer"); if (teamvw != 0) { GetWindowThreadProcessId(teamvw, &team); } if (chromeswnd != 0) { GetWindowThreadProcessId(chromeswnd, &chrome); } if (skypeswnd != 0) { GetWindowThreadProcessId(skypeswnd, &skype); } You're excellent Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Active Member Koray 2001 Posted November 5, 2015 Active Member Share Posted November 5, 2015 (edited) if ((FILE * fp = fopen("version.txt", "w"))) Perfect.. Hidden Content You're excellent What is this? Edited November 5, 2015 by Koray Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7178 Posted November 5, 2015 Honorable Member Share Posted November 5, 2015 (edited) Remember to copy the script from the "raw" button: Makefile (lil edit #2) OT: http://pastie.org/10531919 What is this? It looks like a trivial bad-coded way to detect "legit windows". He thinks you coded such a thing (no idea of where he took it from), which means people can look down on you. Let's see how this will be escalated between you two. Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 Check out my GitHub Link to comment Share on other sites More sharing options...
Active Member Koray 2001 Posted November 5, 2015 Active Member Share Posted November 5, 2015 Unfortunately this code copied from inactive file and test function I don't destroy working function Link to comment Share on other sites More sharing options...
Ken 904 Posted November 5, 2015 Share Posted November 5, 2015 (edited) http://pastie.org/10531919 What is this? It looks like a trivial bad-coded way to detect "legit windows". He thinks you coded such a thing (no idea of where he took it from), which means people can look down on you. Hidden Content It started to boring me... Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Do not be sorry, be better. Link to comment Share on other sites More sharing options...
IISkillzII 2 Posted November 5, 2015 Author Share Posted November 5, 2015 now linking ../testIn file included from main.cpp:93:check_server.h: In static member function 'static bool CheckServer::CheckIp(const char*)':check_server.h:24: warning: comparison between signed and unsigned integer expressionslinking... ../game_r40250_32/usr/bin/ld: cannot find -lmysqlclient/usr/bin/ld: cannot find -lmysqlclientgmake: *** [../test] Error 1gmake: *** Waiting for unfinished jobs....gmake: *** [../game_r40250_32] Error Link to comment Share on other sites More sharing options...
Former Staff Shisui 491 Posted November 5, 2015 Former Staff Share Posted November 5, 2015 In makefile # MySQL ifeq ($(BSD_VERSION), 7) INCDIR += -I../../libmysql/7.x-5.1.35 LIBDIR += -L../../libmysql/7.x-5.1.35 else INCDIR += -I../../libmysql/5.x-5.1.35 LIBDIR += -L../../libmysql/5.x-5.1.35 endif to # MySQL INCDIR += -I../../../Extern/include/mysql LIBS += -lmysqlclient -lz Try it. I don't know if will work, because my Extern folder might be different than yours. Link to comment Share on other sites More sharing options...
IISkillzII 2 Posted November 6, 2015 Author Share Posted November 6, 2015 don´t work... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now