- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am in the process of porting a CVF application to IVF and I am having problems witha call to anIMSL routine due to, I assume, calling conventions.
The program uses a static utility library (util.lib) which in turn uses another staticlibrary (x.lib) whose source codeI don't have access to. x.lib is compiled with IVF with the followingcompiler options:
Fortran>External Procedures:
Calling Convention = STDCALL,REFERENCE
Name Case Interpretation = Lower Case
Append Underscore to External Names = Yes
Fortran>Libraries:
Runtime library = Multithreaded
I used the same settings as above and successfully built the util.lib which uses x.lib. However, when I try tobuildthe Fortran executable whichcalls an IMSL routine and uses util.lib, I getthe LNK2019 error which saysthat the particular IMSL routine name cannot beresolved.I have included theINCLUDE 'include_f90_static.h' statement in my main program. According to IVF help document, IMSL library uses exactly the opposite settings for Fortran>External Procedures options listed above. I suspect that the difference between the name case interpretations (IMSL uses Upper Case, x.lib uses Lower Case) is causing the problem.
Does anybody have an idea how I can resolve this issue?
Thanks for any help,
Jon
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The solution to this is to add the appropriate USE statement for the IMSL routines you are using, following the recommendations of the IMSL documentation. There are two variants. One is to just say:
USE NUMERICAL_LIBRARIES
The other is to add lines such as:
USE FOOBAR_INT
for (fictional) IMSL routine FOOBAR. See the IMSL manual's writeup of the routine in question to see what to use. The latter style is preferable but you may need to change your calls as sometimes the arguments are different (shown in the manual as "Fortran 90 interface".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried your suggestion and I am still getting the same error. Are you sure that the Name Case Interpretation option for the Fortran>External Procedures has nothing to do with this problem? Because when I set this option to Upper Case, the linker error with not finding the IMSL routine goes away but I get other linker errors saying that it can't find the routines which are actually located in my own static library. When I switch to Lower Case, then IMSL routine is not recognized, but all other routines in my static library gets recognized.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page