- 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
Your problem has nothing to do with IMSL.
For example, your log shows:
Searching C:\DVFORTRAN\PCLIBDF\Debug\PCLIBDF_.lib: Found _FILNAM Referenced in TVRR46_E.obj Referenced in Plotgraph.obj Loaded PCLIBDF_.lib(Inut.obj) Processed /DEFAULTLIB:LIBCMT
Library PCLIBDF_.lib was built to link against non-debug C libraries, so it tries pulling in LIBCMT. Because you have /dbglibs set in your Fortran project, that pulls in LIBCMTD and sets you up for a conflict.
The easiest solution is most likely to change your Fortran project to not use /dbglibs . I note that you are also using /libs:qwin - I can't find a way to make the Visual Fortran project system set both /libs:qwin and /dbglibs unless you manually add one of these to the Command Line property page.
You have a lot of possibly unnecessary options as well, such as /f77rtl and /4yportlib.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My guess (since you have not shown us the commands/options used to compile and link) is that you specified debug-libraries when compiling at least one source file, or you are using a third-party library (other than IMSL) that was compiled with debug libraries (or /MTd) specified.
You may use the linker option /nodefaultlib:LIBCMTD.LIB, but it is better to find and fix the build configuration to prevent the dependency on the debug libraries from occurring.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course, the full log-file is shown below:
Compiling with Intel(R) Visual Fortran Compiler XE 14.0.4.237 [IA-32]... ifort /nologo /debug:full /Od /f77rtl /intconstant /warn:interfaces /double_size:128 /Qsave /Qzero /fp:precise /iface:mixed_str_len_arg /module:"Debug/" /object:"Debug/" /Fd"Debug\vc120.pdb" /traceback /check:bounds /libs:qwin /dbglibs /4Yportlib /c /Qvc12 /Qlocation,link,"C:\Program Files (x86)\VC\\bin" "C:\CALC\CaFeMS\Main_elast6b.f90" ifort: command line warning #10212: /fp:precise evaluates in source precision with Fortran. Linking... Link /OUT:"Debug/CaFeMS1-IVF.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"C:\CALC\CaFeMS\Debug\CaFeMS1-IVF.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"Debug/CaFeMS1.pdb" /SUBSYSTEM:WINDOWS /STACK:6000000 /ENTRY:"WinMainCRTStartup" /IMPLIB:"C:\CALC\CaFeMS\Debug\CaFeMS1-IVF.lib" kernel32.lib /MACHINE:I386 "Debug/Moduldata.obj" "Debug/TVRR46_E.obj" "Debug/Fortran_WinPrint_Direct.obj" "Debug/Mich.obj" "Debug/Elasub6.obj" "Debug/ASCIIDBASE.obj" "Debug/SectionData.obj" "Debug/messageboxes.obj" "Debug/Editdata.obj" "Debug/Plotgraph.obj" "Debug/Main_elast6b.obj" "Debug/EDITASSEMBLY.obj" "Debug/PcgrafCVF_old.obj" "Debug/Getopenfilename.obj" "Debug/Dialogs_E6.obj" "Debug/MOVEMENTS.obj" "Debug/FreqSweep.obj" "Debug/DBASE_Operations.obj" "Debug/CalcNatFreq.obj" "Debug/Resource1.res" "Debug/ELAST6.res" "C:\DVFORTRAN\PCLIBDF\Debug\PCLIBDF_.lib" Link: executing 'link' LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invalid_parameter@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj) LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invoke_watson@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj) LIBCMT.lib(invarg.obj) : error LNK2005: __call_reportfault already defined in LIBCMTD.lib(invarg.obj) LIBCMT.lib(invarg.obj) : error LNK2005: __get_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj) LIBCMT.lib(invarg.obj) : error LNK2005: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj) LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj) LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in LIBCMTD.lib(invarg.obj) LIBCMT.lib(invarg.obj) : error LNK2005: __set_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj) LIBCMT.lib(invarg.obj) : error LNK2005: ___pInvalidArgHandler already defined in LIBCMTD.lib(invarg.obj) LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library Debug/CaFeMS1-IVF.exe : fatal error LNK1169: one or more multiply defined symbols found CaFeMS1_ - 10 error(s), 2 warning(s)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your "screenshot" cut off some of the command line and error messages, but mecej4 has the right idea. If you would attach a zip of the buildlog.htm from the Debug folder we might spot another clue. Normally it isn't a problem to link in IMSL's static library with debug C libraries, so something else is going on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You posted the log file in-line, and many lines have been trimmed, so important information is missing.
In #1, you showed a list of library directories, but did not show the actual libraries that the linker should have searched.
Do you have any C source files in your project (or in a C DLL project that is related to the Fortran project)? Some of those C files were probably compiled with /MTd.
- 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
This is only the link step, but I see a lot of "interestingly named" objects and libraries in the link line - with CVF and DVF in names. You need to make sure that all objects and libraries were built with the same setting for the run-time libraries (static vs. dynamic, Debug vs. non-debug).
If you enable the property Linker > General > Show Progress > Show all progress messages, the build log will have more detail about what is being referenced from where.
Basically, I see that something is pulling in the C/C++ "invalid parameter" checking functions and one version of it has already been pulled in from LIBCMT but another is looked for in LIBCMTD. The "progress" messages will be able to tell you where.
- 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
Your problem has nothing to do with IMSL.
For example, your log shows:
Searching C:\DVFORTRAN\PCLIBDF\Debug\PCLIBDF_.lib: Found _FILNAM Referenced in TVRR46_E.obj Referenced in Plotgraph.obj Loaded PCLIBDF_.lib(Inut.obj) Processed /DEFAULTLIB:LIBCMT
Library PCLIBDF_.lib was built to link against non-debug C libraries, so it tries pulling in LIBCMT. Because you have /dbglibs set in your Fortran project, that pulls in LIBCMTD and sets you up for a conflict.
The easiest solution is most likely to change your Fortran project to not use /dbglibs . I note that you are also using /libs:qwin - I can't find a way to make the Visual Fortran project system set both /libs:qwin and /dbglibs unless you manually add one of these to the Command Line property page.
You have a lot of possibly unnecessary options as well, such as /f77rtl and /4yportlib.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Following your advise and switched Runtime library to QuickWin (/libs:qwin). Problem solved!

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