- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
error LNK2005: _ceil already defined in libmmt.lib(ceil_stub.obj) MSVCRT.lib(MSVCR90.dll)
Not sure what to do about it?
(Most of the code is fortran, we have a couple of c libraries and are using openmp)\\
Not sure what to do about it?
(Most of the code is fortran, we have a couple of c libraries and are using openmp)\\
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Caused by having a CEILING intrinsic call in the code? (yes, i commented it out and it is fine).
Compiler bug?
Compiler bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The line
libmmt.lib(ceil_stub.obj) MSVCRT.lib(MSVCR90.dll)
(shown above) raises a suspicion that some objects were compiled with /MT and some with /MD, or that inconsistent library choices were made.
libmmd.lib goes with msvcrt.lib and /MD
libmmt.lib goes with libcmt.lib and /MT
libmmt.lib(ceil_stub.obj) MSVCRT.lib(MSVCR90.dll)
(shown above) raises a suspicion that some objects were compiled with /MT and some with /MD, or that inconsistent library choices were made.
libmmd.lib goes with msvcrt.lib and /MD
libmmt.lib goes with libcmt.lib and /MT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see that I have a long standing "ignore" for libcmt.lib
not sure about msvcrt.lib
and I guess I recompile the c libraries with consistent switches -- found one that was compiled with /md in release mode.
in the mean time have implemented a work around for the CEILING call though I guess I could try some other ignores.
not sure about msvcrt.lib
and I guess I recompile the c libraries with consistent switches -- found one that was compiled with /md in release mode.
in the mean time have implemented a work around for the CEILING call though I guess I could try some other ignores.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
until i can recompile the c libraries, i've gone with all "debug" versions of the libraries. and that seems to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> found one that was compiled with /md in release mode
Nothing wrong with that; /MD simply specifies linking against DLL libraries (e.g., MSVCRT.LIB). The D in /MD does not mean "debug".
If /MT were used instead, that would indicate linking against LIBCMT.LIB.
Nothing wrong with that; /MD simply specifies linking against DLL libraries (e.g., MSVCRT.LIB). The D in /MD does not mean "debug".
If /MT were used instead, that would indicate linking against LIBCMT.LIB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in the c version, it appeared to be a multithreaded DEBUG dll? (that was the /MD)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/MD is Multithread DLL. If you want the Debug version, that's /MDd.
When you have C code, it is not safe to ignore libraries to paper over a mismatch, as the C compiler actually generates different object code depending on which library choice was made for the project. If it's just Fortran code, then it doesn't matter as much.
When you have C code, it is not safe to ignore libraries to paper over a mismatch, as the C compiler actually generates different object code depending on which library choice was made for the project. If it's just Fortran code, then it doesn't matter as much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/MT Multithreaded Static Release: LIBCMT.LIB
/MTd Multithreaded Static Debug: LIBCMTD.LIB
/MD Multithreaded Dynamic Release: MSVCRT.LIB, MSVCR*.DLL
/MDd Multithreaded Dynamic Debug: MSVCRTD.LIB, MSVCR*D.DLL
/MTd Multithreaded Static Debug: LIBCMTD.LIB
/MD Multithreaded Dynamic Release: MSVCRT.LIB, MSVCR*.DLL
/MDd Multithreaded Dynamic Debug: MSVCRTD.LIB, MSVCR*D.DLL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for enlightening me.
It appears I still have to compile these c libraries (someone else compiled them) and make sure they are using the same switches. In the meantime, i went to the debug versions of these and it added considerable to the test suite run.
And I probably threw in the ignore x.lib comment somewhere "right before release" which is when things tend to come together. (and then never investigated it).
It appears I still have to compile these c libraries (someone else compiled them) and make sure they are using the same switches. In the meantime, i went to the debug versions of these and it added considerable to the test suite run.
And I probably threw in the ignore x.lib comment somewhere "right before release" which is when things tend to come together. (and then never investigated it).
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