Category Archives: Development environments

Debugging RenderDoc

Visual Studio 2022 was able to display rdcstr:

(more…)

Setting up QT Creator with MinGW + CMake + Ninja

Add C and C++ compilers:

(more…)

Building a C++ project with MinGW using Visual Studio Code

In CMake Tools extension settings I specified my CMake path:

and built my project with MSVC 2022 first and then switched to MinGW.

Building a project with MSVC 2022

On my machine with installed MSVC 2022 it automatically generated configuration file %LocalAppData%/CMakeTools/cmake-tools-kits.json:

[
  {
    "name": "Visual Studio Professional 2022 Release - amd64",
    "visualStudio": "04bbaecf",
    "visualStudioArchitecture": "x64",
    "preferredGenerator": {
      "name": "Visual Studio 17 2022",
      "platform": "x64",
      "toolset": "host=x64"
    }
  },
  {
    "name": "Visual Studio Professional 2022 Release - amd64_x86",
    "visualStudio": "04bbaecf",
    "visualStudioArchitecture": "x64",
    "preferredGenerator": {
      "name": "Visual Studio 17 2022",
      "platform": "win32",
      "toolset": "host=x64"
    }
  },
(more…)

Compiling a C++ source file in Visual Studio Code with MinGW

I followed this instruction and configured C/C++ extension as follows:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.19041.0",
            "compilerPath": "D:\\dev\\tools\\x86_64-12.2.0-release-win32-seh-rt_v10-rev0\\mingw64\\bin\\g++.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-gcc-x64"
        }
    ],
    "version": 4
}
(more…)

Configuring SFTP access with Visual Studio Code

I installed SFTP extension:

(more…)

Building OpenSSL 3.0.2 with MSVC 2022

Download OpenSSL sources and extract them with Bash:

tar -xvzf /c/Users/D-Ef/Downloads/openssl-3.0.2.tar.gz

Download NASM, open x64 Native Tools Command Prompt for VS 2022 and run the following commands:

set PATH=%PATH%;E:\PFiles\nasm-2.15.05
where nasm
set PATH=%PATH%;E:\PFiles\Strawberry\perl\bin
where perl
set MY_INSTALL_DIR=E:\libs\OpenSSL
echo %MY_INSTALL_DIR%
perl Configure VC-WIN64A --prefix="%MY_INSTALL_DIR%" --openssldir="%MY_INSTALL_DIR%"
(more…)

Bold font in VS2022 C++ code editor

Visual Studio 2022 uses Cascadia Mono font by default:

They probably think that we all are infected by something and need to be vaccinated.

(more…)

How I fixed “No such file” error in Visual Studio Code on Windows 10

Found an answer on stackoverflow.com:

and updated c:\Users\D-Ef\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\sftp.js on my machine:

  // For backwards compat do not emit close on destroy.
  options.emitClose = false;
  options.autoDestroy = false;
(more…)

Multi-Processor in Visual Studio

It is /MP:

(more…)

Debugging a C++ application on an Android device with VS2015 on Windows 10

VS2015 has an exciting ability to debug a C++ application on Android Emulator, but in this article I will talk about no less exciting and more time expensive ability to debug a C++ application on a real Android device. The first thing we need to spend the time with is figuring out how to enable USB debugging mode on our Android device. On my ASUS Zenfone I need to go to Settings->About->Software Information and tap on Build Number 7 times, after that I have USB debugging check box in Settings->Developer Options that I should tap as well:

enabling USB debugging mode on Android device USB debugging mode on Android device

(more…)