labstreaminglayer / liblsl-Matlab

Matlab bindings for liblsl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Correct installation of liblsl?

masteroforest opened this issue · comments

Good day. The description of installation and use is scattered over several documents and not all converges. I installed the appropriate liblsl release, added the path to it (with all the subfolders). Then I downloaded the repository containing examples (it was also added to the MATLAB path). The github states that to use the examples, I must add include / lsl_matlab to the MATLAB path. But where is the directory? I did not find it either in the downloaded release, or in the downloaded repository with examples ... As a result, it produces an error "lsl_loadlib_ undefined", which is not solved by running the file "build_mex.m". Tell me, please, maybe I missed something at the installation stage? And how to run the example?

Best regards,
Dmitriy

You need to have the path to the folder liblsl-Matlab in your Matlab path (on github this is here: https://github.com/labstreaminglayer/liblsl-matlab/tree/99d6d9c1bb6fdce3627ecc3ee2866a03d89e9b41). For example my Matlab path has this line: C:\Users\david.medine\labstreaminglayer\LSL\liblsl-Matlab. I also include the sub folders since I use the examples frequently for testing and sanity checking.

I just downloaded the latest release (https://github.com/labstreaminglayer/liblsl-Matlab/releases/tag/1.13.0-b13-matlab2019b), extracted liblsl-Matlab, added the path to that folder to Matlab's path and ran SendData.m. It should work with contemporary versions of Matlab. For older versions, you might have to build the mex files.

Global installations of liblsl32.dll or liblsl64.dll are generally not a good idea. It is intended, rather, to be distributed along side each app. This is so for historical reasons---early design choices and a lack of central command. The developer community is a bit spread out with each person working on their own corner of the project more or less independently. There is currently no master architect overseeing horizontal integration of the latest version of the latest build for each app. Also, many hardware integrations are handled by manufacturers natively.

Thanks, David! The release downloaded by the link you provided really worked (I have MATLAB 2019b). True, it differs from the ones I downloaded earlier.

Kind regards.