SUNDIALS solvers interface into Matlab.

5 次查看(过去 30 天)
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 个评论
Ajinkya
Ajinkya 2025-3-24
here I have the file installed. what should I do then?
dpb
dpb 2025-3-24
编辑:dpb 2025-3-24
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.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2025-3-24
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 个评论
Ajinkya
Ajinkya 2025-3-25
Could you please tag any expert person that you know in the comments?
dpb
dpb 2025-3-25
编辑:dpb 2025-3-25
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...

请先登录,再进行评论。

更多回答(0 个)

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by