Building BCI2000 with Visual Studio Code

This forum deals with BCI2000 configuration issues.
Post Reply
C_Coogan
Posts: 2
Joined: 06 Jul 2016, 17:45

Building BCI2000 with Visual Studio Code

Post by C_Coogan » 21 Jun 2019, 19:53

Here's an alternate method to build BCI2000. It's still using Visual Studio's build tools behind the scenes just with a lighter IDE.
  • Checkout source from SVN (known to work as of R5964)
  • Open project folder in Visual Studio Code
  • Install the following extensions: "CMake Tools", "CMake", and "C/C++"
  • Create a .vscode folder with a settings.json folder and add the following:
    settings.jpg
  • Open the command palette and select "CMake: Configure"
  • Select a kit (Known to work for 2017/2019 x86_amd64):
    selectKit.jpg
  • Edit generated CMakeCache.txt file to your liking:
    editCMakeCache.jpg
  • Select either Debug or Release (located at the bottom of the screen)
  • Run "CMake: Configure" again.
  • Run "CMake: Show CMake"
  • Find the module you wish to build, right-click, and select "Build"

C_Coogan
Posts: 2
Joined: 06 Jul 2016, 17:45

Re: Building BCI2000 with Visual Studio Code

Post by C_Coogan » 21 Jun 2019, 19:59

And in order to debug a module:
  • Switch to "CMake: Debug" located at the bottom of the screen
  • Start all other modules like normal.
  • Find the module you want to debug, right click and select "Run with debugger"
    BCI2000_debug.jpg
  • Add a breakpoint and when it is reached the VSCode/C++ debugger should open up:
    BCI2000_debugged.jpg

dcvertiz
Posts: 9
Joined: 08 Aug 2019, 14:33

Re: Building BCI2000 with Visual Studio Code

Post by dcvertiz » 08 Aug 2019, 14:45

Hi, I'm new in the world of BCI2000 and I'm trying to use a contribution to use openBCI, what should i do? should I build all BCI2000 source code or openBCI source code only? I'm trying to use Visual Studio but I got an error: No CMAKE_CXX_COMPILER could be found. I'm using VS2019 and windows 10 64bits. I would be really greatful If you could please guide me.

mellinger
Posts: 1208
Joined: 12 Feb 2003, 11:06

Re: Building BCI2000 with Visual Studio Code

Post by mellinger » 16 Aug 2019, 09:32

A full guide how to configure and compile BCI2000 is here:
https://www.bci2000.org/mediawiki/index ... ng_BCI2000

If you have problems with CMake not identifying your C++ compiler, make sure the C++ compiler is actually selected in your visual studio installation options:
https://www.google.com/search?q=Visual+ ... X_COMPILER

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests