Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

In this tutorial, we will walk you through the steps to upgrade your client source code to C++17 using Visual Studio 2019 or 2022. Here’s a detailed breakdown of the necessary modifications to ensure compatibility and leverage the new features offered by C++17.

Step 1: Configure the Project

First, open your client source code in Visual Studio 2019/2022.

  1. Select all the projects in your solution.
  2. Right-click and navigate to Properties.
  3. Under General, find C++ Language Standard, and set it to C++17.

C++17 Configuration

Step 2: Remove Using Namespace

For each source file, perform a global search (by pressing Ctrl + Shift + F) for the following line and delete it:

 
using namespace std;
    

Step 3: Update Standard Type References

In every file, replace the following types:

  • stringstd::string
  • pairstd::pair
  • make_pairstd::make_pair
  • vectorstd::vector

Step 4: Modify Eterbase Project

Navigate to the stl.h file in the Eterbase project, and delete the following code block:

 
This is the hidden content, please

Step 5: Modify std::void_mem_fun References

In every file, search and replace the following:

  • std::void_mem_funstd::mem_fn
  • std::auto_ptrstd::unique_ptr

Step 6: Update User Interface

Open the userinterface/userinterface.cpp file and find this block:

 
This is the hidden content, please

Add the following under this code:

 
This is the hidden content, please

Step 7: Modify SpherePack Header

Open Speherelib/spherepack.h and change this line:

 
This is the hidden content, please

To:

 
This is the hidden content, please

Step 8: Update Cipher Header

Open etherBase/cipher.h and search for:

 
This is the hidden content, please

Add the following under it:

 
This is the hidden content, please

Step 9: Refine Eterpack Header Files

  1. Open etherpack/Eterpack.h and replace:
 
This is the hidden content, please

With:

 
#include <unordered_map>
    
  1. Replace all instances of boost:: with std::.

  2. In etherpack/EterpackManager.h and EterPackPolicy_CSHybridCrypt.h, modify:

 
This is the hidden content, please

To:

 
This is the hidden content, please

Step 10: Update Game Library

Open GameLib/Area.cpp, and remove:

 
This is the hidden content, please

Replace it with:

 
This is the hidden content, please

Final Note

If you have any questions or need clarification on any of the steps, feel free to ask. Good luck with your C++17 transition!

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...