Compiling AppConnector Example

Forum for software developers to discuss BCI2000 software development
Post Reply
prrr
Posts: 1
Joined: 13 Sep 2014, 00:08

Compiling AppConnector Example

Post by prrr » 13 Sep 2014, 00:50

Hi all,

I'm having trouble compiling the makefile for AppConnector Example. Error says:
  • Makefile.Release:64: *** missing separator. Stop.
when I tried mingw32-make release.

I've followed the building instructions from the AppConnectorExample.pdf for Windows:
  • 1. Enter Qt4 development command prompt and use qmake to generate the makefile. [Works; generates Makefile, Makefile.Debug, Makefile.Release and folders]
    2. To make the project, type mingw32-make release (though debug was written in the pdf, perhaps mistakenly). The executable is placed in the release/bin folder. [Error; missing separator at line 64]
I have MVC++ 2010 express, Qt4.8.6, MinGW installed in my machine, and included the needed bins to PATH. My machine is Windows 7, 64-bit (but I used the 32-bit building instructions). I was able to successfully build some modules like the StimulusPresentation project using MVC, and even created a new BCI module (thanks to the tutorials). Unfortunately, I'm stuck with the AppConnector example because I'm not that familiar with make and makefiles. The only lead I can get is from the README file at the example folder saying that Qt4 and MinGW should be installed properly and that the correct files are present on the path. I'm quite sure these are not the problem.

Hope to hear from anyone regarding this. I'm working on an intelligent tutorial system, and I've got my momentum going for BCI2000, but been stuck with this problem for a while.

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Compiling AppConnector Example

Post by boulay » 14 Sep 2014, 16:03

If you are using MVC++ 2010 Express then the recommended way to make the project is to use CMake via the BCI2000\build\Make VS10 Project Files.cmd

Have you tried that? The other batch files are for people using different IDEs and compilers.

If you need to use mingw then let me know where you found that AppConnectorExample.pdf and I'll take a look.

sunny
Posts: 4
Joined: 03 May 2013, 02:24

Re: Compiling AppConnector Example

Post by sunny » 15 Jan 2015, 23:13

I have been trying to compile the bci2000 code but getting lot of issues. I want to integrate bci2000 with an external application, which method should I use -

appconnector

Remote class

Please advice.

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Compiling AppConnector Example

Post by boulay » 17 Jan 2015, 15:48

BCI2000Remote is NOT what you want. That simply allows you to control BCI2000's startup and shutdown.

In general, what you're looking to achieve is called inter-process communication (IPC). The most common forms of IPC use network protocols. BCI2000 modules communicate with each other through TCP. AppConnector uses UDP. Network protocols send packets of information over a network and thus the processes can be running on separate computers or even the same computer (i.e., localhost or 127.0.0.1). If your processes are running on the same computer then you may use a faster IPC implementation like shared memory. See BCI2000's MatlabFilter for an example of a shared memory implementation.

App Connector is probably your easiest option. All you have to do is make your target application accept the UDP packets and similarly send UDP packets out. Some basic examples are provided here:

Code: Select all

http://www.bci2000.org/wiki/index.php/Technical_Reference:App_Connector
Note that the AppConnectorExample program is over 5 years old. It might still compile, but it relies on a fairly old version of Qt, a version older than that currently used by BCI2000. (I haven't tested to see if it was forward compatible). All the AppConnector example does is demonstrate how a C++ program can communicate with BCI2000 through UDP. It is only useful as an example. You will have to write code for your application, maybe using the example as a guide.

Thus, to get AppConnector (not the example) working on the BCI2000 side, you don't need to compile anything. AppConnector should work with the BCI2000 binaries. You just have to parameterize it to tell it where your receiving (and optionally, sending) UDP ports are. The work is in the implementation in your target application. Compiling your target application (if it's even written in a compiled language) is entirely separate to BCI2000. Your target application COULD be Matlab-based, Python-based, javascript-based, etc.

killlereye
Posts: 1
Joined: 09 Feb 2015, 01:07

Re: Compiling AppConnector Example

Post by killlereye » 09 Feb 2015, 01:30

My machine is Windows 7, 64-bit (but I used the 32-bit building instructions). I was able to successfully build some modules like the StimulusPresentation project using MVC, and even created a new BCI module (thanks to the tutorials). Unfortunately, I'm stuck with the AppConnector example because I'm not that familiar with make and makefiles. The only lead I can get is from the README file at the example folder saying that Qt4 and MinGW should be installed properly and that the correct files are present on the path. I'm quite sure these are not the problem.???
Last edited by killlereye on 21 Feb 2015, 05:47, edited 1 time in total.

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Compiling AppConnector Example

Post by pbrunner » 09 Feb 2015, 17:51

killlereye,

using the MSVC toolchain is typically a bit easier. You can use MSVC 2010 SP1* or MSVC 2012 together with CMake to build BCI2000. You can download the express version of MSVC for free. Then just generate the MSVC solution file using the appropriate batch file in the build directory. Let me know if you experience any problems with that.

Regards, Peter

* Please note that BCI2000 will not build on MSVC 2010 unless SP1 is installed.

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Compiling AppConnector Example

Post by boulay » 10 Feb 2015, 09:09

Peter,

The killereye post is from a bot. They have a typical format. They copy portions of text from a previous post in the thread (or sometimes a post from a different thread), and they have a very simple signature. Compare the killereye post to the last paragraph of the first post in the thread.

I don't get why they do it. Maybe the advertising part of the post is silently failing so we're supposed to be getting ads but instead we get almost-relevant posts. We're getting closer...

Code: Select all

http://xkcd.com/810/

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest