Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

In this guide, we'll cover how to effectively upgrade your binary source code to C++17. It's important to keep your project updated with the latest language standards to improve functionality and performance. Below, we provide a clear, step-by-step process for visual studio users to transition from C++14 to C++17.

Step-by-Step Upgrade Instructions

Step 1: Update Project Settings

  1. Open Visual Studio 2019 or 2022.
  2. Select all the solutions in your project and change the settings to C++17. You can select this option in the project properties.

Step 2: Remove Deprecated Namespace Usage

  1. Press Ctrl + Shift + F to open the search function.
  2. Search for using namespace std;.
  3. Remove all instances of using namespace std; to avoid namespace pollution.

Step 3: Edit stl.h

  1. Open the file Eterbase -> stl.h.
  2. Delete the following code block:
 
This is the hidden content, please

Step 4: Replace std::void_mem_fun

  1. Press Ctrl + Shift + F and search for std::void_mem_fun.
  2. Replace all occurrences of std::void_mem_fun with std::mem_fn.

Step 5: Update User Interface Code

  1. Navigate to userinterface / userinterface.cpp.
  2. Search for and modify:
 
This is the hidden content, please

Add the following directly below:

 
This is the hidden content, please

Step 6: Edit SpherePack Header

  1. Open Speherelib/spherepack.h.
  2. Change:
 
This is the hidden content, please

To:

 
This is the hidden content, please

Step 7: Modify Cipher Header

  1. Open etherBase/cipher.h.
  2. Add:
 
This is the hidden content, please

Step 8: Update EterPack Header

  1. Go to etherpack/Eterpack.h.
  2. Remove:
 
This is the hidden content, please

And replace them with:

 
#include <unordered_map>
    
  1. Update all occurrences of boost:: within Eterpack.h to std::.

Step 9: Modify Additional Headers

  1. For etherpack/EterpackManager.h and EterPackPolicy_CSHybridCrypt.h, change:
 
This is the hidden content, please

To:

 
This is the hidden content, please

Step 10: Adjust Python Integration

  1. This is the hidden content, please

     

Final Step: Compile Your Project

After making these changes, compile your project. While you may encounter over 400 errors initially, don’t worry! Focus on errors related to:

Change them accordingly to:

And that's it! Good luck with your upgrade to C++17!

Adopting these changes will ensure a robust transition to C++17, enhancing both the efficiency and reliability of your software project.

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...