Setting up a new BCI2000 C++ module - Error

Forum for discussion on different user applications
Post Reply
eisinger
Posts: 2
Joined: 03 Aug 2017, 15:49

Setting up a new BCI2000 C++ module - Error

Post by eisinger » 03 Aug 2017, 16:06

I'm trying to setup a new C++ program. I've used the NewBCI2000Module.exe and created a new application (module type 3) named "TEMP" wtithin the default parent directory (src/custom). Next, I ran Configure.sh.cmd and selected "Configure."

This led to an error that the source directory (C:/BCI2000.x64/src/custom) does not contain a CMakeLists.txt file. I tried moving the file in C:/BCI2000.x64/src/custom/TEMP/CMakeLists.txt into C:/BCI2000.x64/src/custom, rerunning "Configure" (which ran without errors), but then when clicking "Generate" in CMake, the error "Cannot find source: C:/BCI2000.x64/src/custom/TEMPTask.cpp". So I updated the CMakeLists.txt file within C:/BCI2000.x64/src/custom to instead have "TEMP/TEMPTask.cpp":

bci2000_add_application_module(
TEMP
TEMP/TEMPTask.cpp
)

I wanted to notify the team about this issue but also to get feedback if this is the proper fix? Any recommendations?

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

Re: Setting up a new BCI2000 C++ module - Error

Post by mellinger » 23 Oct 2018, 11:11

The CMakeLists.txt file in the src/custom directory should not contain a bci2000_add_application_module() statement. Rather, it should only include add_subdirectory() statements. Everything else should go into the CMakeLists.txt file contained inside the src/custom/TEMP directory.

-Jürgen

eisinger
Posts: 2
Joined: 03 Aug 2017, 15:49

Re: Setting up a new BCI2000 C++ module - Error

Post by eisinger » 23 Oct 2018, 11:38

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest