• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling OTClient Mehah in Visual Studio 2022

alexxxxxxx

Active Member
Joined
Aug 16, 2015
Messages
22
Reaction score
35
Location
Brasil
GitHub
l3k0t
YouTube
UCMP25Br519j7dD1FF
1713639613616.png

Welcome to the tutorial on how to compile the OTClient Mehah in Visual Studio 2022! In this tutorial, I will guide you through the process of setting up the development environment and compiling the OTClient Mehah in Visual Studio 2022.

Tutorial: Compiling the OTClient Mehah in Visual Studio 2022


Step 1: Necessary Downloads - Download all first

Visual Studio 2022 Community:

Download: Baixar Ferramentas do Visual Studio: Baixar Ferramentas do Visual Studio – Instalação gratuita para Windows, Mac e Linux (https://visualstudio.microsoft.com/pt-br/downloads)

1713639682631.png
Microsoft Visual C++ Redistributable 2015-2022:

Download: 32-bit: https://aka.ms/vs/17/release/vc_redist.x86.exe or 64-bit: https://aka.ms/vs/17/release/vc_redist.x64.exe

Git: If you don't have Git installed yet, download it here: https://git-scm.com/download/win

1713639803099.png

Step 2: Installation - Open Visual Studio 2022, and when you reach this screen, check these options and uncheck the others:

1713639842948.png

1713639856828.png

Installing Git, you can simply click "Next" until the end...


Installing Microsoft Visual C++ Redistributable 2015-2022:

Open your PowerShell.

Type the commands one by one:;...


Code:
git clone https://github.com/Microsoft/vcpkg

Code:
cd vcpkg

Code:
.\bootstrap-vcpkg.bat

64-bit libraries according to your system:
Code:
.\vcpkg install boost-iostreams:x64-windows boost-asio:x64-windows boost-system:x64-windows boost-variant:x64-windows boost-lockfree:x64-windows luajit:x64-windows glew:x64-windows boost-filesystem:x64-windows boost-uuid:x64-windows physfs:x64-windows openal-soft:x64-windows libogg:x64-windows libvorbis:x64-windows zlib:x64-windows opengl:x64-windows openssl:x64-windows liblzma:x64-windows nlohmann-json:x64-windows protobuf:x64-windows

32-bit libraries according to your system:

Code:
.\vcpkg install boost-iostreams:x86-windows boost-asio:x86-windows boost-system:x86-windows boost-variant:x86-windows boost-lockfree:x86-windows luajit:x86-windows glew:x86-windows boost-filesystem:x86-windows boost-uuid:x86-windows physfs:x86-windows openal-soft:x86-windows libogg:x86-windows libvorbis:x86-windows zlib:x86-windows opengl:x86-windows openssl:x86-windows liblzma:x86-windows nlohmann-json:x86-windows protobuf:x86-windows

Code:
.\vcpkg integrate install


Download the latest Mehah client version: GitHub - mehah/otclient: An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize (https://github.com/mehah/otclient)

Now, just open the project in Visual Studio and click compile. It will configure everything correctly and compile.
 
Last edited:
can somebody help me?
Mehah compilation using cmake works ( Compiling on Windows (CMake) (https://github.com/mehah/otclient/wiki/Compiling-on-Windows-(CMake)) ). I've tested it 15 minutes ago.

This is OTClient Mehah thread, not canary OTS thread. Next time post it in Support (https://otland.net/forums/support.16/)

Anyway, canary cmake build also works for me. Downloaded newest vcpkg, followed all steps and it compiles using cmake instruction.
cmake build ( Compiling on Windows (CMake) (https://github.com/opentibiabr/canary/wiki/Compiling-on-Windows-(CMake)) ) creates canary.exe in canary\build\windows-release\bin directory.
Visual Studio build ( Compilling on Windows (Visual Studio Solution) (https://github.com/opentibiabr/canary/wiki/Compilling-on-Windows-(Visual-Studio-Solution)) ) creates canary-sln.exe in main canary directory.
 
Mehah compilation using cmake works ( Compiling on Windows (CMake) (https://github.com/mehah/otclient/wiki/Compiling-on-Windows-(CMake)) ). I've tested it 15 minutes ago.

This is OTClient Mehah thread, not canary OTS thread. Next time post it in Support (https://otland.net/forums/support.16/)

Anyway, canary cmake build also works for me. Downloaded newest vcpkg, followed all steps and it compiles using cmake instruction.
cmake build ( Compiling on Windows (CMake) (https://github.com/opentibiabr/canary/wiki/Compiling-on-Windows-(CMake)) ) creates canary.exe in canary\build\windows-release\bin directory.
Visual Studio build ( Compilling on Windows (Visual Studio Solution) (https://github.com/opentibiabr/canary/wiki/Compilling-on-Windows-(Visual-Studio-Solution)) ) creates canary-sln.exe in main canary directory.
i want to compile mehah otc tried did all steps
get this errors
LUA:
[CODE=lua]Severity    Code    Description    Project    File    Line    Suppression State    Details

Error    MSB3073    The command ""C:\vcpkg\vcpkg.exe" install  --x-wait-for-lock --triplet "x64-windows-static" --vcpkg-root "C:\vcpkg\\" "--x-manifest-root=C:\Users\felip\Documents\GitHub\otclient-mehah-13\\" "--x-install-root=C:\Users\felip\Documents\GitHub\otclient-mehah-13\vcpkg_installed\x64-windows-static\\" " exited with code 1.    otclient    C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets    183

tambien realize el git fetch

Code:
Severity    Code    Description    Project    File    Line    Suppression State    Details

Warning        error: while checking out baseline from commit '13c3c0fcc203d179f4443fe48d252e3ff220cbeb', failed to `git show` versions/baseline.json. This may be fixed by fetching commits with `git fetch`.    otclient    C:\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets    183
[/CODE]
 
Perform the steps without running PowerShell as administrator, otherwise an error will occur. And if you have MinGW on the C drive, rename it to something else as it might cause a conflict.
 
Last edited:
There may be risks during downloading?

.\vcpkg install boost-iostreams:x64-windows boost-asio:x64-windows boost-system:x64-windows boost-variant:x64-windows boost-lockfree:x64-windows luajit:x64-windows glew:x64- system plików boost windows: x64-windows boost-uuid: x64-windows physfs: x64-windows openal-soft: x64-windows libogg: x64-windows libvorbis: x64-windows zlib: x64-windows opengl: x64-windows openssl: x64 -windows liblzma:x64-windows nlohmann-json:x64-windows protobuf:x64-windows



LUA:
error: building openssl:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle openssl:x64-windows: 9 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+openssl
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[openssl]+Build+error+on+x64-windows&body=Copy+issue+body+from+C%3A%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
 
Last edited:
There may be risks during downloading?

.\vcpkg install boost-iostreams:x64-windows boost-asio:x64-windows boost-system:x64-windows boost-variant:x64-windows boost-lockfree:x64-windows luajit:x64-windows glew:x64- system plików boost windows: x64-windows boost-uuid: x64-windows physfs: x64-windows openal-soft: x64-windows libogg: x64-windows libvorbis: x64-windows zlib: x64-windows opengl: x64-windows openssl: x64 -windows liblzma:x64-windows nlohmann-json:x64-windows protobuf:x64-windows



LUA:
error: building openssl:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle openssl:x64-windows: 9 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+openssl
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[openssl]+Build+error+on+x64-windows&body=Copy+issue+body+from+C%3A%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
for anyone with same error run
vcpkg update in your vcpkg directory for cmd its
git pull && vcpkg update
and for powershell
gitpull && ./vcpkg update
 
for anyone with same error run
vcpkg update in your vcpkg directory for cmd its
git pull && vcpkg update
and for powershell
gitpull && ./vcpkg update
same error, tried updating. said no updated needed. kill me now.
 
powershell administrator

LUA:
cd ..
LUA:
cd..

LUA:
git clone https://github.com/Microsoft/vcpkg


LUA:
cd vcpkg


LUA:
.\bootstrap-vcpkg.bat

LUA:
.\vcpkg install boost-iostreams:x64-windows boost-asio:x64-windows boost-system:x64-windows boost-variant:x64-windows boost-lockfree:x64-windows luajit:x64-windows glew:x64-windows boost-filesystem:x64-windows boost-uuid:x64-windows physfs:x64-windows openal-soft:x64-windows libogg:x64-windows libvorbis:x64-windows zlib:x64-windows opengl:x64-windows openssl:x64-windows liblzma:x64-windows nlohmann-json:x64-windows protobuf:x64-windows

LUA:
.\vcpkg integrate install
 
LUA:
The command ""C:\vcpkg\vcpkg.exe" install  --x-wait-for-lock --triplet "x64-windows" --vcpkg-root "C:\vcpkg\\" "--x-manifest-root=C:\Users\aly_r\Desktop\mehana\otclient-main\\" "--x-install-root=vcpkg_installed\\" " exited with code 1.

Im getting this error while compiling after following everything you said and I didnt use the adminstrator powershell
 
Back
Top