View Full Version : error when linking C program calling IMSL Fortran subroutines

12-01-2005, 11:01 PM
I have to call IMSL FNL functions in VC++6.0 in VC++/Mfc Projects not the Fortran Projects.Can I do this? How?. I have tried this code

#include <iostream.h>
//#include "link_f90_dll.h"
char __stdcall ACHAR( int *pk);

void main()
int n = 100;
char v = ACHAR(&n);

it is giving this error

error LNK2001: unresolved external symbol "char __stdcall ACHAR(int *)" (?ACHAR@@YGDPAH@Z)
Debug/Isml.exe : fatal error LNK1120: 1 unresolved externals

I also have gone through the pdf, HOWTO CALL THE IMSL FORTRAN LIBRARIES FROM C by Jangwon Kim Linda M. Robertson Visual Numerics, Inc. IMSL Technical Report Series No. 8902
Here in the given examples they used
Windows NT 4.0 and Windows 95. The
compilers used are Microsoft Visual C++ 6.0 and Compaq Visual Fortran 6.5. Version 4.01 of
the IMSL Fortran 90 MP Library was used.

I have Windows 2K and Windows XP. The
compilers used are Microsoft Visual C++ 6.0 and Intel Visual Fortran 9.0.
IMSL(R) Fortran Library 5.0

If anybody came across such similar situation and found some solution to this I am loking out for that.


12-02-2005, 08:10 AM
Try removing the "stdcall" statement. This is not required with the Intel Fortran version of the IMSL Fortran library.