- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve:
I have used DISLIN with IF, in older versions of Windows - I use the latest 10.
It is quite simple to run a DISLIN program from the IFORT cmd prompt, but I really would like to use it in Visual Studio.
If I install the program as per the developers directions, the first error I get on compiling theirexample program is
Error 1 error #7002: Error in opening the compiled module file. Check INCLUDE paths. [DISLIN] C:\Users\macne\Documents\Visual Studio 2013\Projects\Program064 - DSLIN\DISLIN\DISLIN\exa_f90.f90 132
The mod file it is looking for is in the directory ::
C:\dislin\ifc
There are several ways to reference it -- but what is the recommended or preferred method.
c:\dislin is on the path --
It is the latest DISLIN version - sorry for such a stupid question -- but my way is not a good way
John
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Modules are looked for in the INCLUDE directory list. Add the appropriate folder to the INCLUDE environment variable, or if using Visual Studio, the "Additional Include directories" project property.
For example:
set INCLUDE=C:\dislin\ifc;%INCLUDE%
An alternative is to add:
/IC:\dislin\ifc
to the compile options. (That's a capital I in the option.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
gdi32.lib user32.lib disifm.lib
The example program links with the following libraries. What exactly are gdi32 and user32 for? I added the three to the linker additional dependencies and it worked - thanks
- If you are using your Intel compiler with MS Studio 2005
or later, you have to link with the Dislin library disifm.lib
(or disifm_d.lib) instead of disifl.lib (or disifl_d.lib).
disifm.lib and disifm_d.lib are compiled for using libcmt
instead of libc. If you want to link for Multithreaded DLL
runtime libraries (/MD), you can use the Dislin libraries
disifd.lib (or disifd_d.lib).
What is the difference between libcmt and libc?
Thanks
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
gdi32 and user32 are two Windows API libraries. If your program calls routines declared in these libraries you must link to them. For Fortran code that uses the modules we supply (IFWIN or USER32,GDI32) those modules include directives that pull the libraries in automatically. I would assume that DISLIN calls API routines defined in these libraries, as this is where all of the graphics and user-interaction APIs are.
libc doesn't exist anymore. It was the single-threaded static MSVC library. It went away in VS2005. libcmt is the thread-safe version of the static MSVC library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so
USE USER32
USE GDI32
is the preferred method over IFWIN - or so I think I am reading from an earlier post.
Thanks as usual you are prompt and efficient
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally :
The examples give each subroutine in the main program unit a separate USE DISLIN, can one however place a USE DISLIN at the start of the program and each subroutine will see it -- or is that wrong -
In each module I develop I only use the one statement and have not had problems?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that the individual USE statements for the API modules is better.
Yes, you are wrong about one USE DISLIN at the start of the program. If you use it only once, then you're not getting the declarations from the module in other procedures. (Unless you've put USE DISLIN in a module that you in turn USE in each procedure.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apologies:
I meant
Module D use GDI32 use USER32 use DISLIN contains subroutine new () call DISINI() call DISFIN() return end end module D
if I use the use DISLIN at the start of the module - then all the subroutines in the module see it
This compiles inside my beam program , but on execution I get weird errors as shown in file -- any ideas?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You haven't gotten as far as execution - you're getting link errors due to the dreaded disease MCLS (Multiple C Library Syndrome.) Some of your code is compiled to use the debug static libraries and some is compiled to use the non-debug static C libraries. My guess is that DISLIN is specifying the non-debug. You can change your Fortran project property Fortran > Libraries to specify, for Use Run-Time Library, "Multithreaded" rather than "Debug Multithreaded".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for the help
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page