ebertolazzi / Clothoids

BSD 2-Clause "Simplified" License
106 stars 51 forks source link

Unable to compile Clothoids Toolbox #25

Closed garywu123 closed 1 year ago

garywu123 commented 3 years ago

Hey. I found an issue when I was trying to compile the toolbox.

So I downloaded the toolbox from the link and type CompileClothoidsLib in the Command Window. However, When it executed on File rang.cc it throws an exception about FileNameInfo is not in the scope.

Below is the exception details:

Error using mex
C:\Users\...\MathWorks\MATLAB Add-Ons\Collections\ebertolazzi_Clothoids\toolbox\src\rang.cc: In function
'bool rang::rang_implementation::isMsysPty(int)':
C:\Users\...\MathWorks\MATLAB Add-Ons\Collections\ebertolazzi_Clothoids\toolbox\src\rang.cc:51:79: error:
'GetFileInformationByHandleEx' was not declared in this scope
       auto const ptrGetFileInformationByHandleEx = reinterpret_cast<decltype(&GetFileInformationByHandleEx)>(
                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\...\MathWorks\MATLAB Add-Ons\Collections\ebertolazzi_Clothoids\toolbox\src\rang.cc:80:50: error:
'FileNameInfo' was not declared in this scope
       if ( !ptrGetFileInformationByHandleEx( h, &FileNameInfo, pNameInfo.get(), sizeof(MY_FILE_NAME_INFO)) ) return false;
                                                  ^~~~~~~~~~~~

Is there something that I missed? Thanks for your help.

ebertolazzi commented 3 years ago

Probably you use mingw on MATLAB and not Visual Studio. Now with the version 2.0.8 I added some workaround to compile with mingw.