So I basically built the entire boost library and put them in C:\boost\include\boost-1_73. But I got a feeling that I have to include more steps before I can use this library. I followed this guide up until setting it up for visual studio code. So now I am scouring the internet to search how to set it up. Here is the guide that I followed. But I didnt include it in the program_files directory like in the guide.
https://gist.github.com/sim642/29caef3cc8afaa273ce6
In my Task.Json I have
{ "version": "2.0.0", "tasks": [ { "type": "shell", "label": "C/C++: g++.exe build active file", "command": "C:\\new\\mingw-w64\\i686-8.1.0-posix-dwarf-rt_v6-rev0\\mingw32\\bin\\g++.exe", "args": [ "-g", "${fileDirname}\\**.cpp", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe", ], "options": { "cwd": "${workspaceFolder}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true } } ] } In my main settings.json I have
{ "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe", "code-runner.saveFileBeforeRun": true, "code-runner.saveAllFilesBeforeRun": true, "code-runner.fileDirectoryAsCwd": true, "code-runner.ignoreSelection": true, "haskelly.exec.reuseTerminal": true, "C_Cpp.updateChannel": "Insiders", "r.rterm.windows": "C:\\Program Files\\R\\R-3.6.1\\bin\\R", "vsicons.dontShowNewVersionMessage": true, "files.autoSave": "onWindowChange", "workbench.colorCustomizations": {}, "editor.tokenColorCustomizations": null, "php.validate.executablePath": "", "code-runner.executorMap": { "cpp": "cd $dir && g++ *.cpp -o $fileNameWithoutExt -I C:/boost/include/boost-1_73 -L C:/boost/lib && $fileNameWithoutExt.exe" }, "code-runner.executorMapByFileExtension": {}, "cmake.configureOnOpen": true, "explorer.confirmDelete": false, "editor.formatOnSave": true, "workbench.statusBar.visible": true, "workbench.iconTheme": "material-icon-theme", "workbench.colorTheme": "Better Solarized Light", "code-runner.clearPreviousOutput": true, "code-runner.runInTerminal": true, "C_Cpp.loggingLevel": "Debug", "explorer.sortOrder": "type", "C_Cpp.default.forcedInclude": [], "C_Cpp.default.includePath": [ "C:\\boost\\include\\boost-1_73", ], } How would I include the linker as well(do I even to include the linker?) or if I am doing it properly it all? Will I need to include the path of boost inside Task? It seems to me that the only I did was include it in the intellisense and I am a bit lost now on how to use it. I would greatly appreciate the help.
Edit I made the changes with the following code modified and I created a CPP file to test the lambda header file
#include <boost/lambda/lambda.hpp> #include <iostream> #include <iterator> #include <algorithm> int main() { using namespace boost::lambda; typedef std::istream_iterator<int> in; std::for_each( in(std::cin), in(), std::cout << (_1 * 3) << " "); } And apparently the file doesnt exist:
fatal error: boost/lambda/lambda.hpp: No such file or directory #include <boost/lambda/lambda.hpp> Note that I am running everything with the visual studio code runner extension.