sccn / BCILAB

MATLAB Toolbox for Brain-Computer Interface Research
Other
195 stars 120 forks source link

Mex files do not compile with MSVC 2013/2015 on MATLAB R2017a #33

Open EspoTek opened 7 years ago

EspoTek commented 7 years ago

As title suggests, BCILAB refuses to compile with either Visual Studio 2013 or 2015 on my Windows 10 x64 machine running MATLAB R2017a. It throws up an error suggesting I use old compilers which are not supported by my version of MATLAB.

There are no issues with the system I am using. 'mex -setup' shows that both compilers are present, and I can compile and run other mex files with no issues.

Do you have any idea how to fix this? Below is a dump that appears when calling the bcilab() function.

starting BCILAB...
running config script C:\Users\cesposito\Desktop\BCILAB-master\bcilab_config.m...
running startup function...
Loading BCILAB dependencies...
Loading C:\Users\cesposito\Desktop\BCILAB-master\dependencies\unlocbox-1.1.70...
UnLocBoX version 1.1.70. Copyright 2012-2013 LTS2-EPFL, by Nathanael Perraudin
Loading C:\Users\cesposito\Desktop\BCILAB-master\dependencies\mlunit-1.5.1\src...
mlUnit has found a built-in assert functions.
Trying to rename mlUnit assert.m...not found.
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies>load_dependencies (line 165)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies>load_dependencies (line 165)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In hlp_trycompile (line 445)
  In env_load_dependencies>load_dependencies (line 158)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In hlp_trycompile (line 523)
  In env_load_dependencies>load_dependencies (line 158)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Compiling the function/class cummax...failed.
Please make sure that you have a supported compiler and that your build environment is set up correctly.
Also, please consider reporting this issue.

In case you need to use a better / fully supported compiler, please have a look at:
  http://www.google.com/search?q=matlab+supported+compilers+2017a

On 64-bit Windows, MATLAB comes with no built-in compiler, so you need to have one installed.
A good choice is the free Microsoft Visual Studio 2005/2008/2010 Express compiler suite
together with the Microsoft Platform SDK (6.1 for 2008, 7.1 for 2010) for your Windows Version.
See also: http://argus-home.coas.oregonstate.edu/forums/development/core-software-development/compiling-64-bit-mex-files
          http://www.mathworks.com/support/compilers/R2010b/win64.html
The installation is easier if a professional Intel or Microsoft compiler is used.
Loading C:\Users\cesposito\Desktop\BCILAB-master\dependencies\eeglab_10_0_1_0x...
eeglab: options file is C:\Users\cesposito\Desktop\BCILAB-master\dependencies\eeglab_10_0_1_0x\functions\adminfunc\eeg_options.m
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In eeglab (line 307)
  In run_script (line 123)
  In env_load_dependencies>runscript (line 225)
  In env_load_dependencies>load_dependencies (line 147)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In eeglab (line 307)
  In run_script (line 123)
  In env_load_dependencies>runscript (line 225)
  In env_load_dependencies>load_dependencies (line 147)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Error running dependency loader C:\Users\cesposito\Desktop\BCILAB-master\dependencies\eeglab_10_0_1_0x\env_exec.m; reason: supergui error: argument 'fig' must be numeric
The dependency will likely not be fully operational.
Loading C:\Users\cesposito\Desktop\BCILAB-master\dependencies\cvx-1.21.b795...

Testing the cvx distribution. If this script aborts with
an error, please report the error to the authors.
-------------------------------------------------------------
No errors! cvx has been successfully installed.

NOTE: The MATLAB path has been updated to point to the cvx distribution.
In order to use cvx regularly, you must save this new path definition.
To accomplish this, add these lines to your startup.m file:
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\structures
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\lib
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\functions
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\commands
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\builtins
Consult the MATLAB documentation if necessary.

There were compiling problems for the dependencies in:
  C:\Users\cesposito\Desktop\BCILAB-master\dependencies\mexutils-2013-11-11

This means that the affected features of BCILAB will be disabled.
These issues are usually resolved by installing a (free) Microsoft Visual Studio Express version that is between five years to a half year older than your MATLAB release.
If you install a new compiler, you might have to type "mex -setup" in the MATLAB command line, before MATLAB recognizes it.
Should BCILAB try to recompile in the future (or skip recompilation if not)? [y/n]n
BCILAB will add/update a file called C:\Users\cesposito\.bcilab\bcilab-dont-compile which contains the names of computers on which you chose to disable compilation.

Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies (line 118)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies (line 118)
  In env_startup (line 224)
  In bcilab (line 115) 

code is in C:\Users\cesposito\Desktop\BCILAB-master\code
data is in C:\Users\cesposito\Desktop\BCILAB-master\userdata
results are in C:\Users\cesposito\Desktop\BCILAB-master\userdata
cache is disabled
temp is in C:\Users\cesposito\Desktop\BCILAB-master-temp

 Welcome to the BCILAB toolbox on 4310L-132464-W!
caee commented 5 years ago

I know this is years later, but did you ever find a solution?

EspoTek commented 5 years ago

Never, sorry. Looking back as a software engineer, though, it looks like the error is with the "fig" argument and not the compilation itself. Those were warnings only.

harelasaf commented 4 years ago

Once again, a short jump into the future, but I get an empty window every time I run the script - no way to access the GUI (including the above mentioned warnings). Could these be connected?