- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
