title: VSCode dynamic linking - C++ Boost Test
body: <p>I'm trying to get a Boost Unit Test program to run in VSCode, but I'm having trouble linking the library. </p>
  
  <p>I've written a simple unit test setup with two classes, Boost Test, and FakeIt mocking framework, and easily verified that it works in VS2017. The motivation was to make it work in VSCode eventually though. 
  When I build the project, it fails to find the boost test files. I tried a few different include options; absolutely path, relative path, and with environment variables (as seen in c_cpp_properties.json below).</p>
  
  <p>tasks.json</p>
  
  <pre><code>{
  "version": "2.0.0",
  "tasks": [
      {
          "label": "echo",
          "type": "shell",
          "command": "g++ -g -Wall main.cpp -L/c:/boost/lib64-msvc-14.1 -llibboost_unit_test_framework-vc141-mt-gd-x64-1_69",
          "group": {
              "kind": "build",
              "isDefault": true
          }
      }
  ]
  }
  </code></pre>
  
  <p>launch.json</p>
  
  <pre><code>{
  "version": "0.2.0",
  "configurations": [
      {
          "name": "(gdb) Launch",
          "type": "cppdbg",
          "request": "launch",
          "program": "${workspaceFolder}/a.exe",
          "args": [],
          "stopAtEntry": false,
          "cwd": "${workspaceFolder}",
          "environment": [],
          "externalConsole": true,
          "MIMode": "gdb",
          "miDebuggerPath": "C:/MinGW/bin/gdb.exe",
          "preLaunchTask": "echo",
          "setupCommands": [
              {
                  "description": "Enable pretty-printing for gdb",
                  "text": "-enable-pretty-printing",
                  "ignoreFailures": true
              }
          ]
      }
  ]
  }
  </code></pre>
  
  <p>c_cpp_properties.json</p>
  
  <pre><code>{
  "configurations": [
      {
          "name": "Win32",
          "includePath": [
              "${workspaceFolder}/**",
              "${env:BOOST_ROOT}",
              "${env:FAKEIT}"
          ],
          "defines": [
              "_DEBUG",
              "UNICODE",
              "_UNICODE"
          ],
          "windowsSdkVersion": "10.0.17763.0",
          "compilerPath": "C:/MinGW/bin/gcc.exe",
          "cStandard": "c11",
          "cppStandard": "c++17",
          "intelliSenseMode": "gcc-x64",
          "browse": {
              "path": [
                  "${C:/MinGW/lib/gcc/mingw32/6.3.0/include/c++}"
              ]
          }
      }
  ],
  "version": 4
  }
  </code></pre>
  
  <p>What I get is </p>
  
  <pre><code>Executing task: g++ -g main.cpp &lt;
  
  main.cpp:3:10: fatal error: boost/test/unit_test.hpp: No such file or directory
   #include &lt;boost/test/unit_test.hpp&gt;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  The terminal process terminated with exit code: 1
  </code></pre>
  
  <p>Have I set up my build files incorrectly? Being used to VS2017, I'm fairly new to manually writing the build files, but I did make a working Hello World program in VSCode Cpp, so it's not like the compiler isn't working. Hope someone can help, I can provide the cpp/h files if requested, but it seems unnecessary given that I know it works in VS2017.</p>
  
  <p>Edit1: I can even right click the Boost and FakeIt includes and "Go to Definition", and it opens the files, but when I try to build it says it can't...?!</p>
  
  <p>Edit2: After some searching for makefile compiler commands, I updated the command to </p>
  
  <pre><code>g++ -g -Wall main.cpp -L/c:/boost/lib64-msvc-14.1 
  -llibboost_unit_test_framework-vc141-mt-gd-x64-1_69
  </code></pre>
  
  <p>, trying to tell the compiler to link the library (both .lib and .dll files are present in that folder) but it didn't change anything.</p>
  
  <p>Cheers,
  Tachyon</p>