- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
}
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
swaroop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See my reply in your other thread.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page