The information in this article applies to:
SYMPTOMS
In a mixed-language program, compiling the FORTRAN code using the /MD
option prevents the C Run Time function "putchar" from operating.
CAUSEThis behavior is by design. You cannot safely mix objects built for different program execution models. In this case, putchar('c') is a macro that expands to putc(c,stdout) and stdout is defined differently in MSVCRT.LIB than it is in the statically linked libraries. RESOLUTION
To work around this problem, either
-or- MORE INFORMATIONTo generate the problem, compile the C code using Visual C++ 32-bit Edition and compile the FORTRAN program using option /MD. Include the C object module on the compile line so that it is passed to the linker. The command lines used are as follows:
Run the sample code. It fails to display the letter "c" after "in the dll".
The program will run without error if the FORTRAN program is compiled using the /MT option instead of the /MD option. Sample Code: FORTRAN
Sample Code: C
Additional query words: visualc 1.00 4.00
Keywords : kbCompiler kbFL32 kbFortranPS |
Last Reviewed: November 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |