mcdougallab / matlabneuroninterface

Interface for connecting NEURON and MATLAB
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

In build_interface, check compiler installation #32

Closed AljenU closed 1 year ago

AljenU commented 1 year ago

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 where strcmp(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.

AljenU commented 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?

edovanveen commented 1 year ago

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).

edovanveen commented 1 year ago

Closed by pull request #42