Closed AljenU closed 1 year ago
Is there a way to check for Administrator rights on windows, apart from having a try-catch in build_interface and recognizing the error type?
There is no tool in matlab to check for admin rights (see https://nl.mathworks.com/matlabcentral/answers/299647-m-script-to-determine-if-user-has-administrator-rights).
Compiler check and try/catch for generateLibraryDefinition have been added in edovanveen-phase2a_docupdates (https://github.com/edovanveen/matlabneuroninterface/tree/phase2a_docupdates).
Closed by pull request #42
At least check that a compiler can be found by Matlab. And especially on Windows, check that it is the correct compiler.
For clib building, it should be the same compiler (type) that was used to build Neuron. Which in case of Neuron 8 on Windows, means the MinGW compiler.
To check whether Matlab can find a cpp compuiler, use
confs = mex.getCompilerConfigurations
. This wil return a Nx1 object array, where N is 0 to 3. Loop over the array to check that there is an entry wherestrcmp(confs(i).Language, 'C++')
is true.For checking the type, not sure if that should use the Name or ShortName property, maybe Mathworks can give a recommendation.