- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
I am having a problem linking a program that has both fortran and C code associated with it. Both the C code and the fortran are making calls to log10 function. When it goes to link it, the linker is returning this error:
LIBCMT.lib(log10.obj) : error LNK2005: _log10 already defined in libmmt.lib(log10_stub.omu)
What is causing this erroror how doI correct it?
Kevin
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What other information would you like to see? This code will be used on both 32 bit and 64 bit platforms. I currently compiling on 32 bit. Both libraries are from the static multi-threaded libraries and I have my flags set appropriatly for this.
I am using Visual Studio 2005 SP1 for the C compiler and Intel Visual Fortran 9.1 for the fortran compiler.
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well here are my compile flags so that you can see for yourself. That was the first thing I checked.
C Compile flags:
/GL /MT /openmp /W3 /nologo /Wp64 /O2 /DWIN32 /DNDEBUG /D_LIB /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /D_CRT_NONSTDC_NO_DEPRECATE
Fortran Compile Flags:
/O2 /extend_source:132 /fpp /compile_only /real_size:32/MT /names:lowercase /DWIN32
It is only the log10 function call that I can see that does it. I use many other calls from the math libraries and do not have this problem with them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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