10-14-2007, 12:33 PM,
|
|
joevenzon
Administrator
|
Posts: 2,679
Threads: 52
Joined: Jun 2005
|
|
Need help: serialization class and binary compatibility
I've added a new serialization class to VDrift in SVN R1853/R103. This will be used for replays and, more importantly, for upcoming improved mulitplayer. I need help from you guys to make sure that there aren't going to be incompatibilities in the binary format between different platforms.
Here's what I need: check out the latest code, compile, and run with the -test argument. You should see a bunch of text and then something like this:
Code: [---------------- RUNNING TESTS ----------------]
Results: 5 succeeded, 0 failed
[---------------- TESTS FINISHED ---------------]
Post what's between the RUNNING TESTS and TESTS FINISHED blocks, along with your OS and CPU (and whether or not you run a 64-bit system) in a reply to this post.
I'm curious to see if this will pass for those w/ 64-bit systems, for those on OSX, and for those with big endian machines.
|
|
10-14-2007, 01:11 PM,
|
|
xTs
Member
|
Posts: 150
Threads: 8
Joined: Oct 2006
|
|
Code: [---------------- RUNNING TESTS ----------------]
Results: 5 succeeded, 0 failed
[---------------- TESTS FINISHED ---------------]
Ok now.
|
|
10-14-2007, 06:37 PM,
|
|
abs1nth
Senior Member
|
Posts: 358
Threads: 5
Joined: Sep 2005
|
|
I've added the serialization files to the xcode project but it doesn't compile:
Code: vdrift/tools/osx/../../include/serialization.h: In member function 'void TEST_FRAMEWORK::TEST_VERTEX::Serialize(TEST_FRAMEWORK::SERIALIZER*)':
vdrift/tools/osx/../../include/serialization.h:598: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:599: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:600: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
|
|
10-14-2007, 08:46 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
abs1nth Wrote:I've added the serialization files to the xcode project but it doesn't compile:
Code: vdrift/tools/osx/../../include/serialization.h: In member function 'void TEST_FRAMEWORK::TEST_VERTEX::Serialize(TEST_FRAMEWORK::SERIALIZER*)':
vdrift/tools/osx/../../include/serialization.h:598: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:599: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:600: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
try this patch
Code: Index: include/serialization.h
===================================================================
--- include/serialization.h (revision 1856)
+++ include/serialization.h (working copy)
@@ -585,7 +585,7 @@
{
class TEST_VERTEX
{
- friend class SERIALIZER;
+ friend class ::SERIALIZER;
public:
TEST_VERTEX() {}
TEST_VERTEX(float nx, float ny, float nz) : x(nx),y(ny),z(nz) {}
--alex--
|
|
10-14-2007, 09:15 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
and looking at include/serialization.h some more. at line 263, there is the following code:
Code: if (dataread[0] = '\n')
start = 1;
if (dataread[end-1] = '\n')
end--;
shouldn't those ='s be =='s.
--alex--
|
|
|