Skip to content

Commit e128916

Browse files
committed
Use WSL to compile linux native core library.
1 parent 28d69d8 commit e128916

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

NativeCore/Unix/EnumerateRemoteSectionsAndModules.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ extern "C" void RC_CallConv EnumerateRemoteSectionsAndModules(RC_Pointer handle,
5050
RC_UnicodeChar Path[PATH_MAXIMUM_LENGTH] = {};
5151
};
5252

53-
std::ifstream input((std::stringstream() << "/proc/" << reinterpret_cast<intptr_t>(handle) << "/maps").str());
53+
auto path = std::stringstream();
54+
path << "/proc/" << reinterpret_cast<intptr_t>(handle) << "/maps";
5455

5556
std::unordered_map<int, ModuleInfo> modules;
5657

5758
std::string line;
58-
while (std::getline(input, line))
59+
while (std::getline(std::ifstream(path.str()), line))
5960
{
6061
std::stringstream ss(line);
6162

NativeCore/Unix/NativeCore.Unix.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,22 @@
3333
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'" Label="Configuration">
3434
<UseDebugLibraries>true</UseDebugLibraries>
3535
<ConfigurationType>DynamicLibrary</ConfigurationType>
36+
<PlatformToolset>WSL2_1_0</PlatformToolset>
3637
</PropertyGroup>
3738
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'" Label="Configuration">
3839
<UseDebugLibraries>false</UseDebugLibraries>
3940
<ConfigurationType>DynamicLibrary</ConfigurationType>
41+
<PlatformToolset>WSL2_1_0</PlatformToolset>
4042
</PropertyGroup>
4143
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4244
<UseDebugLibraries>true</UseDebugLibraries>
4345
<ConfigurationType>DynamicLibrary</ConfigurationType>
46+
<PlatformToolset>WSL2_1_0</PlatformToolset>
4447
</PropertyGroup>
4548
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4649
<UseDebugLibraries>false</UseDebugLibraries>
4750
<ConfigurationType>DynamicLibrary</ConfigurationType>
51+
<PlatformToolset>WSL2_1_0</PlatformToolset>
4852
</PropertyGroup>
4953
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5054
<ImportGroup Label="ExtensionSettings" />

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Just download the [latest version](https://github.com/ReClassNET/ReClass.NET/rel
7777
If you want to compile ReClass.NET just fork the repository and open the ReClass.NET.sln file with Visual Studio 2019.
7878
Compile the project and copy the dependencies to the output folder.
7979

80+
To compile the linux native core library, you need WSL [installed and configured](https://learn.microsoft.com/en-us/cpp/build/walkthrough-build-debug-wsl2). If you do not need linux support, simply unload the project in the Solution Explorer.
81+
8082
## Videos
8183

8284
[Youtube Playlist](https://www.youtube.com/playlist?list=PLO246BmtoITanq3ygMCL8_w0eov4D8hjk)

0 commit comments

Comments
 (0)