Include graphic.h

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
chantrip
Posts: 42
Joined: Fri Jul 08, 2011 9:32 am

Include graphic.h

Post by chantrip »

Hi

I'm using Emotiv as my EEG headset and would like to create some games e.g. Pong using P300. I tried to include graphics.h in Openvibe for graphic purpose. Howerver, Openvibe could not recognize the functions and variables associated in graphics.h. I tried other graphic header files e.g. SDL but the results are same. Please let me know how to fix this.

Thanks

-Jim

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Include graphic.h

Post by jtlindgren »

Hi Chantrip,

that question is not really specific to openvibe but concerns how to develop programs with graphics in general, see e.g.

http://stackoverflow.com/questions/7860 ... -c-program

Usually you need to include both a header in the code and link a library to your program to get it to work. What you exactly need to do depends on the graphics library in question. After you've chosen one, follow its documentation to find out how its to be included to your own program. In the case of OpenViBE, you need to edit the CMakeLists.txt file of the subcomponent to add the path to the header, the library, and finally the library linking instruction. Typically the Find* scripts in cmake-modules/ do this in OpenViBE. These scripts will then be converted into instructions for the compiler by the cmake build process.


Happy hacking,
Jussi

chantrip
Posts: 42
Joined: Fri Jul 08, 2011 9:32 am

Re: Include graphic.h

Post by chantrip »

Hi

Thank you for your information. We tried a couple of files but it still doesn't work. Could you please be more specific by giving some example? E.g. if I want to add graphic.h in the file ovpCBoxAlgorithmP300SpellerVisualisation.cpp, which files or paths that I should edit?

Best

-Jim

Post Reply