Re: About the PT Source code
Okay... nice find. I'd heard there was a C++ conversion of the VB server, but never managed to dig it up.
Unfortunately it's built around MySQL 4.x and the present developer downloads don't include the required header files... so we need to dig up a current release site for those, and / or modify this to work with current MySQL developer kits for C++.
I'd rather use Bloodshed DevC++ than MSVC, because Bloodshed is just an IDE for the rewound MinGW GCC, and will allow very reliable builds on non-Windows servers, which are often requested... but I know that, with the correct #ifdef pre-compiler directives you can make source build effectively on multiple development environment targets.
I'm not the worlds greatest at C++, and am more at home with VB6, but I'm pretty handy at C and Assembler. I'd be happy to contribute as and where I can.
An SVN was mentioned to have been set up, but there is no mention of where it was hosted, so I don't know if it still exists, or if anyone has any more recent updates to it.
telatoro is still a frequent name around here, so maybe he can tell us more. ^_^
Re: About the PT Source code
I could probably do some searching for that SVN, even if it's 3 years old. I'll probably do some digging around later this week. If we could get this working, it would be great.
Re: About the PT Source code
Anyone managed to build this? Care to tell us what we need and where we can find it these days? I still haven't found a compatible version of that mySQL dependency.
Re: About the PT Source code
According to the thread you need MySQL 4.1.
Not sure if I can post the link, but here it is. http://dev.mysql.com/downloads/mysql/4.1.html#win32.
The looks of the thread, all there really are, is leechers and idiots in my opinion.
Re: About the PT Source code
Well done... you found it. That download has the dev libraries and includes along with the binaries. \o/
Okay... now to find out what it will compile on. hmm. ;)
Re: About the PT Source code
My guess would be MSVC++ 2005 Maybe 2003. Someone did posted something about Borland C+
Quote:
Try using Borland C++, far better and have cvs and svn repository.
You can download it here: http://www.sofotex.com/Borland-C++-C...load_L501.html
And/or here:
http://www.codegear.com/downloads/free/cppbuilder
I'm going to download Visual Studio 2005 right now and try it with this.
Re: About the PT Source code
I own C++ Builder, but would probably start with VS 2005 Express, or 2003 if I could find an old copy.
If it will build with VC++ and GCC MinGW, then that gives everyone a development environment they can use to work on it I think.
---EDIT---
I've created a Dev-CPP project for it. I notice there isn't even a VCPP project in the source.
I've ironed out a few precompile ordering issues, and am now receiving this:-
Code:
Compiler: Default compiler
Building Makefile: "C:\Users\bobsobol\Desktop\PT_Server\Makefile.win"
Executing make...
make.exe -f "C:\Users\bobsobol\Desktop\PT_Server\Makefile.win" all
g++.exe -c CServer.cpp -o CServer.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Users/bobsobol/Desktop/PT_Server/include"
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:157:1: warning: "isnan" redefined
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:***
from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Dev-Cpp/include/math.h:365:1: warning: this is the location of the previous definition
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:201:1: warning: "finite" redefined
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:158:1: warning: this is the location of the previous definition
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h: In function `double rint(double)':
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:215: error: redefinition of `double rint(double)'
C:/Dev-Cpp/include/math.h:601: error: `double rint(double)' previously defined here
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:230,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Dev-Cpp/include/stdio.h: At global scope:
C:/Dev-Cpp/include/stdio.h:367: warning: `__cdecl__' attribute only applies to function types
C:/Dev-Cpp/include/stdio.h:367: error: `FILE*_popen' redeclared as different kind of symbol
C:/Dev-Cpp/include/stdio.h:363: error: previous declaration of `FILE* _popen(const char*, const char*)'
C:/Dev-Cpp/include/stdio.h:367: error: declaration of `FILE*_popen'
C:/Dev-Cpp/include/stdio.h:363: error: conflicts with previous declaration `FILE* _popen(const char*, const char*)'
C:/Dev-Cpp/include/stdio.h:367: error: expected primary-expression before "const"
C:/Dev-Cpp/include/stdio.h:367: error: expected `)' before "const"
In file included from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:415:1: warning: "my_reinterpret_cast" redefined
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:343:1: warning: this is the location of the previous definition
In file included from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:994:1: warning: "int3store" redefined
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:275:1: warning: this is the location of the previous definition
In file included from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:998:1: warning: "int5store" redefined
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:279:1: warning: this is the location of the previous definition
In file included from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:1009:1: warning: "doubleget" redefined
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:286:1: warning: this is the location of the previous definition
In file included from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:1014:1: warning: "doublestore" redefined
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:288:1: warning: this is the location of the previous definition
In file included from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:1017:1: warning: "float4get" redefined
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:290:1: warning: this is the location of the previous definition
In file included from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:1020:1: warning: "floatstore" redefined
In file included from C:/Users/bobsobol/Desktop/PT_Server/include/my_global.h:65,
from CMySQL.h:19,
from Class.h:18,
from CServer.cpp:13:
C:/Users/bobsobol/Desktop/PT_Server/include/config-win.h:292:1: warning: this is the location of the previous definition
In file included from CCaractere.h:18,
from CMySQL.h:22,
from Class.h:18,
from CServer.cpp:13:
Class.h:337:17: warning: no newline at end of file
In file included from Class.h:18,
from CServer.cpp:13:
CMySQL.h:108:18: warning: no newline at end of file
In file included from CServer.cpp:13:
Class.h:64: error: ISO C++ forbids declaration of `operator=' with no type
In file included from CServer.cpp:13:
Class.h:337:17: warning: no newline at end of file
CServer.cpp: In member function `void CLoginServer::unknowFunction(long int)':
CServer.cpp:454: error: `isgraph' undeclared (first use this function)
CServer.cpp:454: error: (Each undeclared identifier is reported only once for each function it appears in.)
CServer.cpp: In member function `void CGameServer::unknowFunction(long int)':
CServer.cpp:1023: error: `isgraph' undeclared (first use this function)
make.exe: *** [CServer.o] Error 1
Execution terminated
Blegh! What a mess. Only 1 actual error though, the rest is warnings, and mostly it's about stuff in the MySQL headers. :s
The Error is a bunch of stuff about Dev-CPPs stdio... but that normally works okay when I write from scratch... so I guess it's being used in an unusual way in this code.
I'm not a great C++ head though, so I could probably use some pointers.
Mean time, I'll move on to other compilers, and see what results I get there.
Re: About the PT Source code
Here's the error log from BCB6:-
Code:
Build
[C++ Error] config-win.h(139): E2238 Multiple declaration for 'size_t'
[C++ Warning] my_global.h(994): W8017 Redefinition of 'int3store' is not identical
[C++ Warning] my_global.h(1000): W8017 Redefinition of 'int5store' is not identical
[C++ Warning] my_global.h(1011): W8017 Redefinition of 'doubleget' is not identical
[C++ Warning] my_global.h(1014): W8017 Redefinition of 'doublestore' is not identical
[C++ Warning] my_global.h(1015): W8017 Redefinition of 'float4get' is not identical
[C++ Warning] my_global.h(1018): W8017 Redefinition of 'floatstore' is not identical
[C++ Error] Class.h(64): E2352 Cannot create instance of abstract class 'CServer'
[C++ Warning] CServer.cpp(205): W8012 Comparing signed and unsigned values
[C++ Warning] CServer.cpp(440): W8012 Comparing signed and unsigned values
[C++ Warning] CServer.cpp(450): W8012 Comparing signed and unsigned values
[C++ Warning] CServer.cpp(699): W8004 'id' is assigned a value that is never used
[C++ Warning] CServer.cpp(793): W8004 'client' is assigned a value that is never used
[C++ Warning] CServer.cpp(1009): W8012 Comparing signed and unsigned values
[C++ Warning] CServer.cpp(1019): W8012 Comparing signed and unsigned values
[C++ Warning] CServer.cpp(1249): W8004 'i' is assigned a value that is never used
[C++ Warning] CServer.cpp(1601): W8004 'info' is assigned a value that is never used
[C++ Warning] CServer.cpp(1772): W8066 Unreachable code
Also... maybe of interest. Here is a link to the last time this (and it's predecessor) where discussed here in the PT section of RZ. http://forum.ragezone.com/f286/gs-pt-emu-lol-316039/
It turned into a flame war between Superman666 and Sandurr. shagpub locked the tread, so let's not start that up again. :D