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

compile errors when trying to call imsl fortran functions from vc++ project

swarup_1981
Beginner
320 Views
Sir/Madam
I am using intel fortran compiler and MS .NET .I tried to call imsl fortran function(LSGRR) from a vc++ project and there are many compile errors.The code is as follows


#include
#include
#include
//#include "avlib.h"
#include "avcrt.h"
#include "link_f90_static.h"
//#include "link_f90_dll.h"
extern void __stdcall LSGRR(double a,double GINV,int TOL,int IRANK);

main ()
{
int NRA=3, NCA=2, LDA=3,LDGINV=2,IRANK;
double A[3][2],GINV[2][3],**TOL;
for (int i=1;i=3;i++)
{
for(int j=1;j=2;j++)
A=i+1;
}
TOL = AMACH(4);
TOL = 10 * TOL;
LSGRR_(A, GINV,TOL=TOL, IRANK=IRANK);
WRRRN_('GINV', GINV);
}


and the errors are as follows

C:ProgrammeVNICTT5.0includeIntel32link_f90_static.h(2): error C2015: too many characters in constant
C:ProgrammeVNICTT5.0includeIntel32link_f90_static.h(3): error C2015: too many characters in constant
C:ProgrammeVNICTT5.0includeIntel32link_f90_static.h(4): error C2015: too many characters in constant
C:ProgrammeVNICTT5.0includeIntel32link_f90_static.h error C2059: syntax error : '!'
C:ProgrammeVNICTT5.0includeIntel32link_f90_static.h error C2059: syntax error : 'constant'
C:ProgrammeVNICTT5.0includeIntel32link_f90_static.h(2): error C2059: syntax error : 'constant'
C:ProgrammeVNICTT5.0includeIntel32link_f90_static.h(3): error C2059: syntax error : 'constant'
C:ProgrammeVNICTT5.0includeIntel32link_f90_static.h(4): error C2059: syntax error : 'constant'
c:ProgrammeIlogswaroop_examplesc_fortranc_fortran1.cpp(24): error C2297: '*' : illegal, right operand has type 'double ** '
c:ProgrammeIlogswaroop_examplesc_fortranc_fortran1.cpp(23): error C3861: 'AMACH': identifier not found, even with argument-dependent lookup
c:ProgrammeIlogswaroop_examplesc_fortranc_fortran1.cpp(25): error C3861: 'LSGRR_': identifier not found, even with argument-dependent lookup
c:ProgrammeIlogswaroop_examplesc_fortranc_fortran1.cpp(26): error C3861: 'WRRRN_': identifier not found, even with argument-dependent lookup
c_fortran Command line warning D4007 : '/Gm' requires '/Zi or /ZI'; option ignored


Please help me in this regard

Swaroop
0 Kudos
3 Replies
Steven_L_Intel1
Employee
320 Views
The link_xxx.h files are not C include files. They are Fortran files, despite the .h file type. You will need to explicitly name the IMSL libraries you wish to link against in the Linker property page.
0 Kudos
swarup_1981
Beginner
320 Views
I specified the libraries in the project properties--linker--input--additional dependencies.I specified the path in the project properties--linker--general--library directories.I even specified the paths in tools--options--projects--vc++ direcories.but even then the same errors persist.Can you help me in this regard.
swaroop
0 Kudos
Steven_L_Intel1
Employee
320 Views
See my reply in your other thread.
0 Kudos
Reply