Server Help

Bot Questions - Cannot Compile MERVBot

L.C. - Sat Sep 30, 2006 3:05 pm
Post subject: Cannot Compile MERVBot
I'm using Dev-C++ 4.9.9.2 with Ming and all that jazz (I downloaded the full package last week from the Dev-Cpp website). I open MERVBot.dev, Execute, then Compile.
I've already generated the Makefile, so this is what I get (and what was in the logs when I first attempted to compile, which generated the makefile before compiling):

Code: Show/Hide
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Qwerty \Desktop\MERVBot\src\Makefile.win"
Executing  make...
make.exe -f "C:\Documents and Settings\Qwerty \Desktop\MERVBot\src\Makefile.win" all
g++.exe Debug/botdb.o Debug/botdll.o Debug/botinfo.o Debug/checksum.o Debug/chunk.o Debug/client.o Debug/clientprot.o Debug/command.o Debug/commtypes.o Debug/datatypes.o Debug/dllcore.o Debug/encrypt.o Debug/hack.o Debug/host.o Debug/hostlist.o Debug/map.o Debug/player.o Debug/prng.o Debug/sockets.o Debug/specialprot.o Debug/system.o Debug/algorithms.o  -o "MERVBot.exe" -L"E:/Utilities/Dev-Cpp/lib" "../../Program Files/Dev-Cpp/lib/libws2_32.a" zlib.lib 

g++.exe: ../../Program Files/Dev-Cpp/lib/libws2_32.a: No such file or directory

make.exe: *** [MERVBot.exe] Error 1

Execution terminated

Ok, changing the entry of "../../Program Files/Dev-Cpp/lib/libws2_32.a" in the Makefile didn't work, of course.

I tried making existing locations of "../../Program Files/Dev-Cpp/lib/libws2_32.a," like having a...
E:/Program Files/Dev-Cpp/lib/libws2_32.a
E:/Utilities/Program Files/Dev-Cpp/lib/libws2_32.a
E:/Utilities/Dev-Cpp/Program Files/Dev-Cpp/lib/libws2_32.a
C:/Program Files/Dev-Cpp/lib/libws2_32.a

None of those helped. How do I fix this? icon_sad.gif


EDIT :: Ok, figured out how. I had to go to the Project Properties and browse through the tabs until I came across the Linker in the Parameters that was set to "../../Program Files/Dev-Cpp/lib/libws2_32.a" - Thanks anyway. icon_smile.gif
L.C. - Sat Sep 30, 2006 3:17 pm
Post subject:
Ok. Next question.
I compile to get MERVBot.exe - are there sopossed to be any DLLs or other files that were sopossed to be generated? Or does the coder have to go and manually make them up (INI and TXT Files) and retrieve some files (ZLIB)?

Also - I noticed a vast difference in the filesize of Catid's compile vs a 3rd party compile. His is about 206KB, while mine was around 710KB. How do I get it compiled to be that small?
Bak - Sat Sep 30, 2006 3:20 pm
Post subject:
Are you compiling in debug mode (does dev-cpp have such a thing?)? Also, maybe MSVC's compiler is better.

The dlls are compiled seperately, and really you don't even need to compile the .exe to make dll plugins for subspace, although having a deeper understanding of things can only help.
Smong - Sat Sep 30, 2006 6:47 pm
Post subject:
L.C. wrote:
Also - I noticed a vast difference in the filesize of Catid's compile vs a 3rd party compile. His is about 206KB, while mine was around 710KB. How do I get it compiled to be that small?
You can try going to project options -> parameters, add "-Os -s" to at least the C++ text area. Also the compiler tab may have more debug things you can disable, you can also try disabling C++ exceptions. Don't forget to click rebuild all, not just compile.
L.C. - Sun Oct 01, 2006 5:32 pm
Post subject:
Code: Show/Hide
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Qwerty \Desktop\MERVBot\src\Makefile.win"
Executing  make clean
rm -f Debug/botdb.o Debug/botdll.o Debug/botinfo.o Debug/checksum.o Debug/chunk.o Debug/client.o Debug/clientprot.o Debug/command.o Debug/commtypes.o Debug/datatypes.o Debug/dllcore.o Debug/encrypt.o Debug/hack.o Debug/host.o Debug/hostlist.o Debug/map.o Debug/player.o Debug/prng.o Debug/sockets.o Debug/specialprot.o Debug/system.o Debug/algorithms.o  MERVBot.exe

g++.exe -c botdb.cpp -o Debug/botdb.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from botdb.h:11,
                 from botdb.cpp:1:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from botdb.h:11,
                 from botdb.cpp:1:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c botdll.cpp -o Debug/botdll.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from botdll.cpp:5:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from botdll.cpp:5:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c botinfo.cpp -o Debug/botinfo.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from botinfo.cpp:1:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from botinfo.cpp:1:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c checksum.cpp -o Debug/checksum.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from checksum.cpp:4:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from checksum.cpp:4:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c chunk.cpp -o Debug/chunk.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c client.cpp -o Debug/client.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from botdb.h:11,
                 from client.cpp:1:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from botdb.h:11,
                 from client.cpp:1:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c clientprot.cpp -o Debug/clientprot.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from clientprot.cpp:1:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from clientprot.cpp:1:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c command.cpp -o Debug/command.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from command.cpp:4:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from command.cpp:4:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

command.cpp: In function `void gotCommand(Host*, Player*, char*)':
command.cpp:772: warning: passing negative value `-0x000000001' for converting 1 of `clientMessage* generateObjectToggle(Uint16, objectInfo*, Uint16)'
command.cpp:790: warning: passing negative value `-0x000000001' for converting 1 of `clientMessage* generateObjectModify(Uint16, lvzObject*, Uint16)'

g++.exe -c commtypes.cpp -o Debug/commtypes.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c datatypes.cpp -o Debug/datatypes.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c dllcore.cpp -o Debug/dllcore.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c encrypt.cpp -o Debug/encrypt.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c hack.cpp -o Debug/hack.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c host.cpp -o Debug/host.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from host.cpp:1:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from host.cpp:1:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c hostlist.cpp -o Debug/hostlist.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from hostlist.cpp:3:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from hostlist.cpp:3:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c map.cpp -o Debug/map.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c player.cpp -o Debug/player.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c prng.cpp -o Debug/prng.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c sockets.cpp -o Debug/sockets.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c specialprot.cpp -o Debug/specialprot.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

In file included from specialprot.cpp:1:
clientprot.h:240: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:458: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

In file included from specialprot.cpp:1:
clientprot.h:467: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

clientprot.h:524: warning: #pragma pack (pop) encountered without matching #pragma pack (push, <n>)

g++.exe -c system.cpp -o Debug/system.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe -c algorithms.cpp -o Debug/algorithms.o -I"E:/Utilities/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/backward"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"E:/Utilities/Dev-Cpp/include/c++/3.4.2"  -I"E:/Utilities/Dev-Cpp/include"  -Os -s   -Os -s -fexpensive-optimizations -O3

g++.exe Debug/botdb.o Debug/botdll.o Debug/botinfo.o Debug/checksum.o Debug/chunk.o Debug/client.o Debug/clientprot.o Debug/command.o Debug/commtypes.o Debug/datatypes.o Debug/dllcore.o Debug/encrypt.o Debug/hack.o Debug/host.o Debug/hostlist.o Debug/map.o Debug/player.o Debug/prng.o Debug/sockets.o Debug/specialprot.o Debug/system.o Debug/algorithms.o  -o "MERVBot.exe" -L"E:/Utilities/Dev-Cpp/lib" "E:/Utilities/Dev-Cpp/lib/libws2_32.a" zlib.lib

Execution terminated
Compilation successful

This is the full log of when I Rebuild All every time. Ok, the MERVBot.exe works fine on its default factory settings and configurations, but when I try to use my compile over one of my AFK Bots, it crashes. :S
cReEmY - Sun Oct 01, 2006 6:26 pm
Post subject:
i wish i could help but i don't no any yet
Bak - Sun Oct 01, 2006 7:44 pm
Post subject:
Then why are you posting?

chances are that's a bug in your afk bot code, rather than mervbot itself. Does a blank module crash? If not, put some debug printfs in your code at every (relevant) event so you can see what event it crashes on.
L.C. - Sun Oct 01, 2006 8:13 pm
Post subject:
Quote:
chances are that's a bug in your afk bot code, rather than mervbot itself. Does a blank module crash? If not, put some debug printfs in your code at every (relevant) event so you can see what event it crashes on.
I never wrote my posts meaning to imply that the "AFK Bot" is a completely different form of bot. Meh, sorry about that. sa_tongue.gif I define AFK Bot by being a regular MERVBot with all its commands disabled, simply. I am used the regular/unmodified MERVBot Build46 source code, and compiling it will only generate immidiate crashes upon alternate configurations (compared to defaults).
Smong - Mon Oct 02, 2006 3:50 am
Post subject:
Why not leave everything as default then?
L.C. - Mon Oct 02, 2006 7:53 am
Post subject:
Quote:
Why not leave everything as default then?

Still crashes.

EDIT :: Actually - maybe I was misunderstood again. icon_surprised.gif I meant by alternate configurations, as in a modified Spawns/Commands/Operators.TXT, MERVBot.INI. It seems like if it attempts to connect to an existant IP and Port, it'll crash immidiately. Either that - or even a byte of difference in those 4 files.

But yes - I also reloaded the source files to start off anew with default compile/Dev-Cpp settings. From the very defaults of compiling, even that doesn't work. :O I guess I'll have to find a chance to get MSVC.
Cyan~Fire - Mon Oct 02, 2006 9:55 am
Post subject:
I could probably help you, but honestly MERV is outdated and not really worth the effort.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group