Skip to content

Instantly share code, notes, and snippets.

@Shivam60
Forked from sim642/boost-windows.md
Last active January 14, 2023 15:11
Show Gist options
  • Save Shivam60/4a3a4923616ed317a9a094a8173c3391 to your computer and use it in GitHub Desktop.
Save Shivam60/4a3a4923616ed317a9a094a8173c3391 to your computer and use it in GitHub Desktop.
Installing boost libraries for GCC (MinGW) on Windows

Installing boost libraries for GCC (MinGW) on Windows

Ensure GCC is working as expected.

  1. Open Command Prompt.
  2. Run g++ --version.
  3. If the output contains g++ version number then GCC should be set up properly to run from command line and you can continue.

Boost installation

  1. open MSYS2 MINGW32
  2. install boost by using the command pacman -S mingw-w64-x86_64-boost

Project setup

  1. Add arguement -lws2_32 args array in vscode in task.json.
  2. Add arguement "C:\\msys64\\usr\\include" in includePath array in c_cpp_properties.json file.
@Shivam60
Copy link
Author

            "args": [
                "-static-libstdc++",
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe",
                "-lws2_32"
            ],

args in task.json should look like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment