Open Reactos code in Visual Studio Code

All development related issues welcome

Moderator: Moderator Team

Post Reply
q.michal
Posts: 9
Joined: Thu May 21, 2020 7:16 pm

Open Reactos code in Visual Studio Code

Post by q.michal »

Hello,

Anyone already tried opening ReactOS source code in Visual Studio Code?
I got a lot of errors about unknown keywords and I have no idea how to setup the include paths. Sometimes it does not see headers, sometimes sees 2 or more files with same name. Can anyone help with setting up this IDE?
User avatar
Dz3n
Posts: 6
Joined: Tue Dec 04, 2018 5:35 pm

Re: Open Reactos code in Visual Studio Code

Post by Dz3n »

Don't use it like IDE, just edit code in it like with usual Notepad..
q.michal
Posts: 9
Joined: Thu May 21, 2020 7:16 pm

Re: Open Reactos code in Visual Studio Code

Post by q.michal »

That's the point - to use IDE as IDE.
User avatar
Fraizeraust
Posts: 232
Joined: Thu Jan 05, 2017 11:46 am
Location: Italy
Contact:

Re: Open Reactos code in Visual Studio Code

Post by Fraizeraust »

Visual Studio Code is merely an editor which you can extend its functionality with plugins and whatnot. Don't expect it to be a fully fledged and complete IDE environment like Visual Studio hence no Microsoft Visual C++ (MSVC) compiler by default so no, you cannot use it as an IDE by this definition.

You can obtain it through a standalone Windows SDK in official Microsoft website though. Otherwise you can just use RosBE to compile ROS without a hassle.
a.k.a. GeoB99 -- My Wiki page
q.michal
Posts: 9
Joined: Thu May 21, 2020 7:16 pm

Re: Open Reactos code in Visual Studio Code

Post by q.michal »

I know it does not include a compiler, but as an IDE it should highlight and conplete syntax. But it warns about unknown keywords actually.
User avatar
sdever
Posts: 20
Joined: Fri Oct 16, 2015 6:45 pm

Re: Open Reactos code in Visual Studio Code

Post by sdever »

Hello,

I guess VS Code is not yet ready to be a full-blown IDE, especially for ReactOS which has a lot of submodules with different include paths which can conflict each other, so if you want reliable completion, you should use a full-blown Visual Studio instead (or Eclipse/CodeBlocks if you are on Linux).

Anyways, I was able to build ReactOS directly from VSCode, here is the settings.json I used.

Code: Select all

{
    "cmake.configureOnOpen": false,
    "cmake.buildDirectory": "${workspaceFolder}/output-i686-mingw",
    "cmake.clearOutputBeforeBuild": true,
    "cmake.configureSettings": {
        "ARCH": "i386",
        "MINGW_TOOLCHAIN_PREFIX": "/opt/RosBE/i386/bin/i686-w64-mingw32-",
        "KDBG": false,
        "_WINKD_": true,
        "GDB": true,
        "SEPARATE_DBG": true
    },
    "cmake.configureArgs": [
        "-DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake"
    ],
    "C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools"
}
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests