I'm trying to compile a dynamic library in VS2010. I've already tried compiling it with ifort using multiple compile lines for lowest level source files to highest level. Everything compiled fine but I did get one warning at the end:
LINK: warning LNK4098: defaultlib 'LIBCMT' conflicts with the use of other libs; use /NODEFAULTLIB:library
Nevertheless I think that the dll has compiled OK.
Next I tried to move all the source files to visual studio. I enabled preprocessing because my source files do contain some directives. Unfortunately when I try to build the solution I get an error for one of the subroutines at an intermediate-level source files:
If each source file is compiled separately and all the resulting .OBJ files linked to produce the DLL, mismatched arguments will be detected only if the called subprogram and the lines with the calls to it are in the same source file. You should investigate and ensure that the mismatch is safe ignore, or fix the error.
The reason that you obtained different behavior with VS is that the compiler options in effect were different than when you compiled at the command line. There are menu items in VS in which you can find the effective options; you can also find that information in the build log file.