EOS Development under Windows Subsystem For Linux and UBuntu - Visual Studio Code Setup
I have some trouble to configure properly VS Code under windows to edit/create and compile CPP files for the EOSIO blockhain:
I've followed this guide: https://infinitexlabs.com/setup-ide-for-eos-development/, this was an excellent start but now I'm stuck trying to edit/compile CPP from VS Code.
So i don't know exactly how to make the both systems (Ubuntu & Windows) to work together and interact properly:
AS from now, I was able to
- Compile the EOSIO software until the end
- Test my local node
- Run it
- Interact with it (Create accounts etc),
- Compile some smart contracts examples directly from Ubuntu
- Create few smart contracts in my local he Blockchain etc.
- Call actions etc.
Now I would like to "fully" develop from VS.
Knowing that my windows EOS local folder is "C:\Workspaces\EOS\eos" and is visible from Ubtuntu under "/mnt/c/Workspaces/EOS/eos".
When I open a (new) worskpace in VS (Windows) : Shall I open directly from "C:\Workspaces\EOS\eos" ?
Does Windows will edit the files correctly without corrupting them ? (Ex. adding CRLF at the end etc?)
Or should i made another copy for windows (this is what i did by create a new folder: WindowsDEVWK)
How to make VS know that "I want to develop for Linux system" ?
For example if try to launch the shell script provided in the infinitexlab tutorial), i do have the following error;
> Executing task in folder WindowsDEVWK: sh C:\WindowsDEVWK/.vscode/scripts/compile.sh < sh: 0: Can't open C:WindowsDEVWK/.vscode/scripts/compile.sh The terminal process terminated with exit code: 127 Terminal will be reused by tasks, press any key to close it.
I tried to defined different integrated terminals (https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration), but no success.
(I checked, the shell scripts files are 'valid' unix files)
So how to configure properly the WS and make VS use the correct path (C:\WindowsDEVWK is a copy of the EOS files) ?
Finally if I open the Hello.cpp example, I do have the following include errors:
#include errors detected. Please update your includePath. IntelliSense features for this translation unit (C:\WindowsDEVWK\contracts\hello\hello.cpp) will be provided by the Tag Parser. cannot open source file "boost/container/flat_set.hpp" (dependency of "eosiolib/eosio.hpp") So how to make the Include path correct to find the files ? (For example Boost is not under the EOS original file folder)
And last but not least, as advised in the setup guide, I've installed the following extensions in VS
C/C++ – IntelliSense, debugging, and code browsing for VS Code
CMake – CMake language support for Visual Studio Code
CMake Tools – Extended CMake support in Visual Studio Code
How to configure CMAKE? Should I modify the files provided by EOSIO ? (I don't think so)
Sorry if my English is approximate (I'm not an English native speaker!).
Please help! I tried different search in Google, but I'm not able to find a real full guide for this ...