----------------------------- File: a.cpp ------------- # include #include Extern "C" {void _stdcall testa (int *);} void main () {double a = sin (1.00); cout << "a =" << a; INT II = 1; Testa (& II);
------------------------------ File: BF ------------- Subroutine Testa (IA Write (*, *) "IA =", irateturnend compiles error: lineing ... dfor.lib (Matherr.obj): Error LNK2005: __matherr already defined in libcd.lib (Matherr.obj) link: warning lnk4098: defaultlib "libc.lib" conflicts with use of other libs; use /NODEFAULTLIB:libraryDebug/StaggeredGrid.exe: fatal error LNK1169: one or more multiply defined symbols foundError executing link.exe the analysis found that because the main function call inside. SIN math function, the solution is to add a file header: #pragma comment (lib, "dfor")