Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

MCLS confusion

Dishaw__Jim
Beginner
362 Views
I've descended into the abyss of MCLS. Here is the scenario. I'm trying to create a DLL that contains everything (minus the windows, visual studio, intel libraries) needed to run. I plan on using the DLL for two purposes: A single library that I can provide to others and a DLL that I can use from Mathematica.

The DLL consists of one project with (currently) two modules. Those two modules refer to other modules that exist in static libraries. At first I created the static libraries with /libdir:none and was treated to a large number of unresolved symbols when attempting to make the DLL. I then created the libraries without /libdir:none and got the warning

warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
NOTE: If I specifiy /Zl (instead of /MDd or /MD) on the library that consists of C code, I get a unresolved symbol error for ___mb_cur_max instead of the above warning.

I ultimately get an executable that terminates when from from within the IDE because it cannot find libifcorertd.dll. If run the executable from the "Intel Visual Fortran Build Environment ...." command window, it can find the libifcorertd.dll library.
0 Kudos
2 Replies
Dishaw__Jim
Beginner
362 Views
I was able to resolve most of the issues and get things working by building all my code with the /libs:static (for Fortran) and /MLd or /ML flags (for C code). I also cannot use the /libdir:none flag in Fortran because it results in a plethora of undefined symbols. The part that confuses me is that I have to specify a library and I cannot add /libdir:none. When researching about creating third-party libraries, I thought the recommendation in this forum was to specify /libdir:none. On a seperate issue, sometimes the breakpoints that are within the DLL do not appear to be valid. I can single step through without a problem. If I then run the debugger a second time, the breakpoints work.
0 Kudos
Steven_L_Intel1
Employee
361 Views

For a DLL, you would not want to use /libdir:none (or is it noauto? I forget...) You should be able to get the library settings to be compatible.

I have not seen the breakpoint issue before.

0 Kudos
Reply