How to build a single module
Posted: 03 Mar 2011, 10:19
Dear all,
first many thanks for this new BCI2000 v3. I did manage to compile BCI2000 quite easily using MinGW and codeblocks under Windows 7 proving that you did a great job to facilitate the task.
Now that I have tested that everything is working I wanted to implement my own module and for this start with a random dirac signal generator (generate a peak randomly with a small probability of occurrence). I thus copied the SignalGenerator, changed its name, and tried to compile it alone. I managed to go through a few obstacles, like how to define MODTYPE with codeblocks (go in the project complier options, and add a variable in "compiler settings / #define" that contains MODTYPE=X with X the type of module you are using) and including the needed headers. Then the problem is to find the dependencies with others .cpp. I spent all my afternoon trying to add the needed files in the project without success. Either there are redundant functions (too much files) or some missing or linkage errors etc... Of course one solution would be to include my module in the cmake created project and recompile all BCI2000 but you would understand that this is not the best solution. My questions are:
- is there any library to use that contains the proper functions (appart from the Qt ones that are already included) ?
- do you have at hand a template for codeblocks project files (like for Borland as suggested here http://www.bci2000.org/wiki/index.php/Programming_FAQ) ?
- is there an easy way to find the needed files (for instance I used the cmake generated project to find the needed .h files easily) ?
- is there a way to use cmake that would solve my problem (I know nothing about it) ?
Thanks for you attention and you answers,
Best regards,
Guillaume Chanel
first many thanks for this new BCI2000 v3. I did manage to compile BCI2000 quite easily using MinGW and codeblocks under Windows 7 proving that you did a great job to facilitate the task.
Now that I have tested that everything is working I wanted to implement my own module and for this start with a random dirac signal generator (generate a peak randomly with a small probability of occurrence). I thus copied the SignalGenerator, changed its name, and tried to compile it alone. I managed to go through a few obstacles, like how to define MODTYPE with codeblocks (go in the project complier options, and add a variable in "compiler settings / #define" that contains MODTYPE=X with X the type of module you are using) and including the needed headers. Then the problem is to find the dependencies with others .cpp. I spent all my afternoon trying to add the needed files in the project without success. Either there are redundant functions (too much files) or some missing or linkage errors etc... Of course one solution would be to include my module in the cmake created project and recompile all BCI2000 but you would understand that this is not the best solution. My questions are:
- is there any library to use that contains the proper functions (appart from the Qt ones that are already included) ?
- do you have at hand a template for codeblocks project files (like for Borland as suggested here http://www.bci2000.org/wiki/index.php/Programming_FAQ) ?
- is there an easy way to find the needed files (for instance I used the cmake generated project to find the needed .h files easily) ?
- is there a way to use cmake that would solve my problem (I know nothing about it) ?
Thanks for you attention and you answers,
Best regards,
Guillaume Chanel