- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I am trying to do my Fortran callable from MATLAB using a MEX-function. I have done this in the past, and succeeded, but now I get this linking error :
Creating library _lib5782.lib and object _lib5782.exp
LINK : warning LNK4098: defaultlib "libcmt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
I have read somewhere that this problem may occur if you mix Fortran and C, if you do not use 'multithread' on both languages. But how do I solve this for Fortran/MATLAB?
I will be thankfull for any help.
// Jenny
I am trying to do my Fortran callable from MATLAB using a MEX-function. I have done this in the past, and succeeded, but now I get this linking error :
Creating library _lib5782.lib and object _lib5782.exp
LINK : warning LNK4098: defaultlib "libcmt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
I have read somewhere that this problem may occur if you mix Fortran and C, if you do not use 'multithread' on both languages. But how do I solve this for Fortran/MATLAB?
I will be thankfull for any help.
// Jenny
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have never used MATLAB, so I don't know the details of what it does in its mex script. Clearly, either the MATLAB modules it links in, or your code, is specifying the multithreaded libraries. Looking at a MATLAB knowledge base article, I would guess that it is your code somehow. I would think that to be compatible with MATLAB, you'd want the Fortran Libraries setting to be Single-Threaded DLL. But as I say, I haven't used MATLAB, so I am just reading between the lines of what they have on their web site.
If you can't resolve it, I suggest contacting Mathworks for more help.
Steve
If you can't resolve it, I suggest contacting Mathworks for more help.
Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page