SUNDIALS solvers interface into Matlab.
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ajinkya
el 24 de Mzo. de 2025
Error using mex
MEX cannot find library 'sundials_cvode', specified with the -l option.
MEX searched for a file with one of the following names:
libsundials_cvode.lib
sundials_cvode.lib
Verify the library name is correct. If the library is not
on the existing path, specify the path with the -L option.
I am getting the above error while executing the mex. the library name is "libsundials_cvode.a". Do I need to change the extension to ".lib" or the error is something else.
I am trying to create the sundials interface into MATLAB. I know the latest versions of MATALAB have sundials configured in it. Just doing it for a learning.
3 comentarios
dpb
el 24 de Mzo. de 2025
Editada: dpb
el 24 de Mzo. de 2025
My old eyes can't read that and can't do anything with an image, anyways...need to see the actual make file; probably better to link to the source of what you're trying to build so folks have some klew as to what you actually started with...maybe it's bum.
As noted, the simplest fix, presuming the lib file was actually made correctly (which may be a big assumption, we can't tell) is to simply rename the .a lib file to match the link lib name--of course, that means starting at the link step and not rebuilding the whole thing which would simply recreate the .a version.
As noted earlier, this indicates something is broken in the make file but we can't see it from here...whoever created/posted it would be the one/place to turn to.
Respuesta aceptada
Walter Roberson
el 24 de Mzo. de 2025
You appear to be using MS Windows. MS Windows does not use the .a file extension -- the .a file extension is for statically linked libraries on Linux and MacOS.
In order to link .dll files, the executable must be linked against a .lib file
If all you have are .dll files and .a files then you cannot successfully link in Windows -- the .a will be ignored in Windows and the .dll need .lib
10 comentarios
dpb
el 25 de Mzo. de 2025
Editada: dpb
el 25 de Mzo. de 2025
Impolite and improper use of tags to use contributors...and I know nobody in the area, anyways. One would suppose there are support groups associated with the MSYS organization.
Somewhere in the bowels of that downloaded folder C:/msys64/home/z0052r2r/sundials will be the actual make file that is being run; it would be interesting to look into it and turn on a verbose mode flag for compiler switches to see what it shows... for gcc that would be "-v", it's been so long since used MS VC I don't recall which it is there.
I had to rebuild the machine a while back and haven't yet gotten around to reinstalling the compiler(s) so don't have anything to play with here at the moment...
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Support for MinGW-w64 C/C++ Compiler en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

