Author Topic: RakNet 2.45 released  (Read 16552 times)

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
RakNet 2.45 released
« on: February 18, 2006, 03:09:30 AM »
This one fixes the gcc build errors (it's a bug in gcc) and fixes the bug some people have reported with getting reliable ordered packets out of order.

It also simplifies the data replication system by removing the property flags and never using unified memory.

Skinney

  • Guest
Re: RakNet 2.45 released
« Reply #1 on: February 18, 2006, 05:14:28 AM »
Im using Code::Blocks with MingW and even though im getting much less errors than with 2.44 i still get errors with the bitstream.h class  :-\

Quote
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:342: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:342: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:347: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:347: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:354: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:354: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:360: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:360: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:363: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:363: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:366: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:366: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:370: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:370: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:374: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:374: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:380: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:380: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:384: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:384: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:389: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:389: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:394: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:394: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:399: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:399: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:402: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:402: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:405: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:405: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:408: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:408: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:412: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:412: error: explicit specialization in non-namespace scope `class RakNet::BitStream'
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:417: error: invalid explicit specialization before '>' token
D:\Documents and Settings\Skinney\Mine dokumenter\C++\Prosjekter\RakNet\test\/BitStream.h:417: error: explicit specialization in non-namespace scope `class RakNet::BitStream'

Anyway to fix this?

wrt

  • Full Member
  • ***
  • Posts: 139
  • Karma: 0
    • View Profile
Re: RakNet 2.45 released
« Reply #2 on: February 18, 2006, 08:51:45 AM »
hi

i've got a general question: Why do we actually want to use template spezialisation?

i don't get the compiler errors any more, but now i get linker errors ( see below). I spent some time googeling around and found the following: http://www.parashift.com/c++-faq-lite/templates.html#faq-35.11 What basically says is that overloading will still work, even if some of the functions are templates and the template ones will be used for everything that isn't specified.

So from my point of view it looks like we're discussing the difference between "Do this for everything exept a, b and c" and "for a, b, and c do this and for the rest do that" which equals to zero. Of course you could start a flame war against gcc now, but has anyone tried this with anything other than msvc and gcc, the intel compiler for example?

here are the linker errors i get:
Code: [Select]
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:602: first defined here
ReliabilityLayer.o: In function `void RakNet::BitStream::WriteCompressedDelta<bool>(bool, bool)':
/home/wrt/proggn/RakNet/Include/BitStream.h:640: multiple definition of `void RakNet::BitStream::WriteCompressedDelta<bool>(bool, bool)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:640: first defined here
ReliabilityLayer.o: In function `void RakNet::BitStream::WriteCompressedDelta<bool>(bool)':
/home/wrt/proggn/RakNet/Include/BitStream.h:656: multiple definition of `void RakNet::BitStream::WriteCompressedDelta<bool>(bool)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:656: first defined here
ReliabilityLayer.o: In function `bool RakNet::BitStream::Read<bool>(bool&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:692: multiple definition of `bool RakNet::BitStream::Read<bool>(bool&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:692: first defined here
ReliabilityLayer.o: In function `bool RakNet::BitStream::Read<PlayerID>(PlayerID&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:709: multiple definition of `bool RakNet::BitStream::Read<PlayerID>(PlayerID&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:709: first defined here
ReliabilityLayer.o: In function `bool RakNet::BitStream::ReadDelta<bool>(bool&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:734: multiple definition of `bool RakNet::BitStream::ReadDelta<bool>(bool&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:734: first defined here
ReliabilityLayer.o: In function `bool RakNet::BitStream::ReadCompressed<PlayerID>(PlayerID&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:770: multiple definition of `bool RakNet::BitStream::ReadCompressed<PlayerID>(PlayerID&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:770: first defined here
ReliabilityLayer.o: In function `bool RakNet::BitStream::ReadCompressed<bool>(bool&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:776: multiple definition of `bool RakNet::BitStream::ReadCompressed<bool>(bool&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:776: first defined here
ReliabilityLayer.o: In function `bool RakNet::BitStream::ReadCompressed<float>(float&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:783: multiple definition of `bool RakNet::BitStream::ReadCompressed<float>(float&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:783: first defined here
ReliabilityLayer.o: In function `bool RakNet::BitStream::ReadCompressed<double>(double&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:796: multiple definition of `bool RakNet::BitStream::ReadCompressed<double>(double&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:796: first defined here
ReliabilityLayer.o: In function `bool RakNet::BitStream::ReadCompressedDelta<bool>(bool&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:830: multiple definition of `bool RakNet::BitStream::ReadCompressedDelta<bool>(bool&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:830: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::ReadCompressed<unsigned short>(unsigned short&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:475: multiple definition of `void RakNet::BitStream::Write<bool>(bool)'
BitStream.o:BitStream.cpp:(.text+0x0): first defined here
StringCompressor.o: In function `bool RakNet::BitStream::ReadCompressed<unsigned short>(unsigned short&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:486: multiple definition of `void RakNet::BitStream::Write<PlayerID>(PlayerID)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:486: first defined here
StringCompressor.o: In function `void RakNet::BitStream::WriteDelta<PlayerID>(PlayerID, PlayerID)':
/home/wrt/proggn/RakNet/Include/BitStream.h:515: multiple definition of `void RakNet::BitStream::WriteDelta<PlayerID>(PlayerID, PlayerID)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:515: first defined here
StringCompressor.o: In function `void RakNet::BitStream::WriteDelta<bool>(bool, bool)':
/home/wrt/proggn/RakNet/Include/BitStream.h:533: multiple definition of `void RakNet::BitStream::WriteDelta<bool>(bool, bool)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:533: first defined here
StringCompressor.o: In function `void RakNet::BitStream::WriteCompressed<PlayerID>(PlayerID)':
/home/wrt/proggn/RakNet/Include/BitStream.h:577: multiple definition of `void RakNet::BitStream::WriteCompressed<PlayerID>(PlayerID)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:577: first defined here
StringCompressor.o: In function `void RakNet::BitStream::WriteCompressed<bool>(bool)':
/home/wrt/proggn/RakNet/Include/BitStream.h:583: multiple definition of `void RakNet::BitStream::WriteCompressed<bool>(bool)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:583: first defined here
StringCompressor.o: In function `void RakNet::BitStream::WriteCompressed<float>(float)':
/home/wrt/proggn/RakNet/Include/BitStream.h:590: multiple definition of `void RakNet::BitStream::WriteCompressed<float>(float)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:590: first defined here
StringCompressor.o: In function `void RakNet::BitStream::WriteCompressed<double>(double)':
/home/wrt/proggn/RakNet/Include/BitStream.h:602: multiple definition of `void RakNet::BitStream::WriteCompressed<double>(double)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:602: first defined here
StringCompressor.o: In function `void RakNet::BitStream::WriteCompressedDelta<bool>(bool, bool)':
/home/wrt/proggn/RakNet/Include/BitStream.h:640: multiple definition of `void RakNet::BitStream::WriteCompressedDelta<bool>(bool, bool)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:640: first defined here
StringCompressor.o: In function `void RakNet::BitStream::WriteCompressedDelta<bool>(bool)':
/home/wrt/proggn/RakNet/Include/BitStream.h:656: multiple definition of `void RakNet::BitStream::WriteCompressedDelta<bool>(bool)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:656: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::Read<bool>(bool&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:692: multiple definition of `bool RakNet::BitStream::Read<bool>(bool&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:692: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::Read<PlayerID>(PlayerID&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:709: multiple definition of `bool RakNet::BitStream::Read<PlayerID>(PlayerID&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:709: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::ReadDelta<bool>(bool&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:734: multiple definition of `bool RakNet::BitStream::ReadDelta<bool>(bool&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:734: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::ReadCompressed<PlayerID>(PlayerID&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:770: multiple definition of `bool RakNet::BitStream::ReadCompressed<PlayerID>(PlayerID&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:770: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::ReadCompressed<bool>(bool&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:776: multiple definition of `bool RakNet::BitStream::ReadCompressed<bool>(bool&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:776: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::ReadCompressed<float>(float&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:783: multiple definition of `bool RakNet::BitStream::ReadCompressed<float>(float&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:783: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::ReadCompressed<double>(double&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:796: multiple definition of `bool RakNet::BitStream::ReadCompressed<double>(double&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:796: first defined here
StringCompressor.o: In function `bool RakNet::BitStream::ReadCompressedDelta<bool>(bool&)':
/home/wrt/proggn/RakNet/Include/BitStream.h:830: multiple definition of `bool RakNet::BitStream::ReadCompressedDelta<bool>(bool&)'
BitStream.o:/home/wrt/proggn/RakNet/Include/BitStream.h:830: first defined here

one more thing, the "#ifdef _WIN32" in BitStream.h should propably be changed to "#ifdef THIS_IS_MSVC" or whatever the identifier for msvc is, cause mingw will try to compille the code it isn't supposed to (see the post above)

aah, i keep forgetting things: There are some source files in the zip archive that are excactly 0 bytes small, is this intended?

cu wrt 
« Last Edit: February 18, 2006, 09:16:38 AM by wrt »

Kithral

  • Not-a-newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: RakNet 2.45 released
« Reply #3 on: February 18, 2006, 11:42:35 AM »
adding -traditional to the CC line of makefile.defs fixes the multiple declaration error.

## ADD - -traditional seems to work on CVS version but not downloaded version

On another note.  The version available for download from the website.  Is it 2.45 or 2.44 (as it says on the page) or is it version 2.4.1 ( as it is defined in CVS makefile.defs ) or 2.4.3.2 (as it is defined in the downloaded version makefile.defs)?
« Last Edit: February 18, 2006, 11:48:44 AM by Kithral »

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: RakNet 2.45 released
« Reply #4 on: February 18, 2006, 11:53:21 AM »
OK everything should be fixed now.  Please download the full zip again.  The readme.txt always has the correct version number.  The CVS is not being updated right now as I'm switching to subversion, probably today.

Silver Hawk

  • Full Member
  • ***
  • Posts: 105
  • Karma: 0
    • View Profile
    • Crestock
Re: RakNet 2.45 released
« Reply #5 on: February 18, 2006, 11:58:15 AM »
OK everything should be fixed now.  Please download the full zip again.  The readme.txt always has the correct version number.  The CVS is not being updated right now as I'm switching to subversion, probably today.

Thank you very much :D.

I will give it a try.

Best wishes,
Michael

PS.: What will be good, is that with SVN and TortoiseSVN (but other client SVN too) you can submit patches, which IMHO they would be a useful support for RakNet. Moreover, it would also be very easy to update RakNet :).
« Last Edit: February 18, 2006, 12:04:23 PM by Silver Hawk »

Kithral

  • Not-a-newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: RakNet 2.45 released
« Reply #6 on: February 18, 2006, 12:06:16 PM »
Still getting multiple definitions while trying to compile shared.  Static seems to compile okay...guess -traditional was not the answer after all
« Last Edit: February 18, 2006, 12:21:41 PM by Kithral »

Silver Hawk

  • Full Member
  • ***
  • Posts: 105
  • Karma: 0
    • View Profile
    • Crestock
Re: RakNet 2.45 released
« Reply #7 on: February 18, 2006, 12:28:11 PM »
Hello,

I am build RakNet with CodeBlocks - GCC 4.1.0 and things are going much better than before :).

I have had to correct some , e.g., in Include\NetworkTypes.h - line 44:

Code: [Select]
PlayerID& PlayerID::operator = ( const PlayerID& input )  //error here!
PlayerID& /*PlayerID::*/operator = ( const PlayerID& input ) //PlayerID:: has to be taken out!

The error is:

Quote
Include/NetworkTypes.h:44: error: extra qualification 'PlayerID::' on member 'operator='

Anyway, I am stuck here (Include\BinarySearchTree.h - line 222):

Code: [Select]
balance_tree( current, false ); //error

The error is:

Quote
Include/BinarySearchTree.h:222:   instantiated from 'void BasicDataStructures::AVLBalancedBinarySearchTree<BinarySearchTreeType>::del(const BinarySearchTreeType&) [with BinarySearchTreeType = ObjectIDNode]'

I am a bit short of time now (and I am not an expert of RakNet). I will try again later.

Best wishes,
Michael

PS.: There are other errors and warnings. I will attach them here.

wrt

  • Full Member
  • ***
  • Posts: 139
  • Karma: 0
    • View Profile
Re: RakNet 2.45 released
« Reply #8 on: February 18, 2006, 02:19:15 PM »
hi

well, the version in the makefile.defs will tell you, when the makefile was last updated, not the current version. This is because rakkar doesn't normally update it and I only send him new makefiles when it's necessary. If you want to get the real version number have a look at the readme file.

ah nice, the new version actually really works :-)

cu wrt

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: RakNet 2.45 released
« Reply #9 on: February 18, 2006, 03:12:40 PM »
The only error in the CodeBlocks text file you attached is

Source\RakPeer.cpp: In member function 'virtual bool RakPeer::Initialize(short unsigned int, short unsigned int, int, const char*)':
Source\RakPeer.cpp:237: error: 'UpdateNetworkLoop' was not declared in this scope

What I'm doing there is perfectly valid so I don't know why it's complaining.  I'll leave it to you to figure out, and if you do so then let me know and I'll include the fix in the next version.

Silver Hawk

  • Full Member
  • ***
  • Posts: 105
  • Karma: 0
    • View Profile
    • Crestock
Re: RakNet 2.45 released
« Reply #10 on: February 18, 2006, 03:29:18 PM »
The only error in the CodeBlocks text file you attached is

Source\RakPeer.cpp: In member function 'virtual bool RakPeer::Initialize(short unsigned int, short unsigned int, int, const char*)':
Source\RakPeer.cpp:237: error: 'UpdateNetworkLoop' was not declared in this scope

When compiling it gave me 14 errors (without taking into consideration the 3-4 "extra qualification errors" that I have corrected). I think that the "instantiated from here" is considered an error message. I will give it a look more in depth. I will post/send to you the solution (admitted that I found one :)).

What I'm doing there is perfectly valid so I don't know why it's complaining.  I'll leave it to you to figure out, and if you do so then let me know and I'll include the fix in the next version.

GCC 4.1.0 seems much more strict than GCC 3.4.4. I have also heard that GCC 3.4.5 is stricter as GCC 3.4.4, but not so as GCC 4.1.0 (anyway, I have not tried it yet). Visual Studio .NET 2003's compiler seems to be AFAIK the less strict one.

Best wishes,
Michael

Valen

  • Full Member
  • ***
  • Posts: 117
  • Karma: 5
    • View Profile
Re: RakNet 2.45 released
« Reply #11 on: February 18, 2006, 03:53:35 PM »
There're some problems that Visual C++ 7.0 (.NET 2002) is having with the code. The template specialization member prototypes in the BitStream class that you removed are necessary for VC++ 7.0 to compile the templates. From what I remember, Microsoft only fixed that in VC++ 7.1. ::) All you have to do though where you commented out the #ifdef for WIN32 is what I did below. 1300 is the version for Visual C++ 7.0, and it should be different for 7.1 (or you can just check if _MSC_VER is defined if 7.1 doesn't complain about the prototypes).

#ifdef _MSC_VER
   #if _MSC_VER == 1300
      
      //template specialization prototypes go here

   #endif
#endif

This will make the template code compile for VC++ 7.0. There's also another error I get:
SingleProducerConsumer.h(244) : error C2446: '==' : no conversion from 'const Packet *' to 'volatile Packet *'

I was able to get it to compile by using a const_cast to remove volatility:

assert(const_cast<const SingleProducerConsumerType *>(&readPointer->object) == data);

Skinney

  • Guest
Re: RakNet 2.45 released
« Reply #12 on: February 18, 2006, 04:07:39 PM »
The new version gives me no compile errors, but linking errors however...
im compiling the "chat server example.cpp" and i have added bot RakNetDLL.lib and RakNetStaticLib.lib to the linker but i still get these errors:

Quote
-------------- Build: default in test ---------------
Linking console executable: test.exe
.objs\Chat Example Server.o:Chat Example Server.cpp:(.text+0x1f): undefined reference to `RakNetworkFactory::GetRakServerInterface()'
.objs\Chat Example Server.o:Chat Example Server.cpp:(.text+0x24f): undefined reference to `StatisticsToString(RakNetStatisticsStruct*, char*, int)'
.objs\Chat Example Server.o:Chat Example Server.cpp:(.text+0x4a2): undefined reference to `RakNet::BitStream::GetData() const'
.objs\Chat Example Server.o:Chat Example Server.cpp:(.text+0x501): undefined reference to `RakNet::BitStream::GetData() const'
.objs\Chat Example Server.o:Chat Example Server.cpp:(.text+0x540): undefined reference to `RakNet::BitStream::GetData() const'
.objs\Chat Example Server.o:Chat Example Server.cpp:(.text+0x5f6): undefined reference to `RakNetworkFactory::DestroyRakServerInterface(RakServerInterface*)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

now i'm not that experienced when it comes to programming and stuff but it should work right?
what could be wrong?
(still using Codeblocks and Mingw btw)

Kithral

  • Not-a-newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: RakNet 2.45 released
« Reply #13 on: February 18, 2006, 04:21:02 PM »
I'm having the same problem but only with shared libs...the static libs seem to compile fine.

Skinney

  • Guest
Re: RakNet 2.45 released
« Reply #14 on: February 19, 2006, 05:53:34 AM »
no one knows how to solve this? i would REALLY like to get started using RakNet ASAP  :'(