Other Questions

Error while reading 'dislin' module

The precompiled DISLIN Fortran 90 module is not compatible with your Fortran 90 compiler version. You have to compile the file 'dislin.f90' with your compiler version for creating a working 'dislin.mod' file.

Access violation with Fortran 90 and DISLIN routine

If you are using a DISLIN version before 9.1, please check if you have included the statement 'USE DISLIN' in the Fortran 90 program unit where you are calling DISLIN routines. Without the statement 'USE DISLIN', arrays may be passed incorrectly to DISLIN routines. Since version 9.1 of DISLIN, the array declarations in the DISLIN module file are changed from assumed-shape arrays to explicit-shape arrays for native Fortran 90 libraries, so that this problem should no longer appear.

LINK: cannot open file LIBC.lib

This error appears if you are using the current DISLIN distribution for MS Visual C++ or Intel Visual Fortran with MS Visual Studio 2005 or Visual C++ 2005 Express Edition where the single-threaded library libc.lib has been removed. The Dislin distributions for MS Visual C++ and Intel Visual Fortran contain additional libraries (disvcm.lib and disifc.lib) which are compiled for libcmt instead of libc. Please use these libraries for linking.

Cannot find libXm.so.3

The OpenMotif runtime package must be installed for using DISLIN on a Linux system. The alternate package Lesstiff is normally not full compatible to the DISLIN widget routines which are compiled with openmotif-devel-2.2.2-14.

How can I use DISLIN for Intel Visual Fortran from MS Visual Studio?

Download and install the DISLIN distribution for Intel Visual Fortran (dl_10_if.zip) and make the following project settings for DISLIN in MS Visual Studio 2005, 2008 or 2010:

  • Add the directory of the dislin.mod file (i.e. c:\dislin\ifc) to

    Properties -> Fortran -> General -> Additional Include Directories

  • Change the Runtime library to Multithreaded in

    Properties -> Fortran -> Libraries -> Runtime Library

  • Add the DISLIN libraries disifc.lib and disdll.lib together with the system libraries user32.lib and gdi32.lib to

    Properties -> Linker -> Input -> Additional Dependencies
    (i.e. c:\dislin\disifc.lib c:\dislin\disdll.lib user32.lib gdi32.lib)

Note:

  • If you have installed the wrapper distribution of DISLIN for Intel Visual Fortran (dl_10_ic.zip), you have to use the link libraries:
    c:\dislin\disifm.lib user32.lib gdi32.lib (for 32-bit) and
    c:\dislin\disifl.lib user32.lib gdi32.lib (for 64-bit)

How can I use DISLIN for MingW from the C-Free IDE?

You need the following Build Options for DISLIN:

  • Build Options -> Directories -> Include Files

    Add here the entry c:\dislin for finding the DISLIN header file dislin.h.

  • Build Options -> Linker -> Linker Options

    Add here the entry c:\dislin\dismg.a -lgdi32 -luser32

How can I use DISLIN from the Bloodshet Dev-C++ IDE?

Please download the DISLIN distribution for MingW (dl_10_mg.zip) and set the following project options in the IDE:

  • Build Options -> Directories -> Include Files

    Add here the entry c:\dislin for finding the DISLIN header file dislin.h.

  • Build Options -> Linker -> Linker Options

    Add here the entry c:\dislin\dismg.a -lgdi32 -luser32 -lopengl32

If you have not installed DISLIN in the default directory c:\dislin, you have to use that directory in the options above.

How can I use DISLIN with Microsoft Visual C++ 2008 Express Edition?

Microsoft Visual C++ 2008 Express Edition can generate native and managed code. If you want to generate native code, you can use the following instructions:

  • Download and install the DISLIN distribution for MS Visual C++ (dl_10_vc.zip). Define the environment variable DISLIN and modify the PATH variable as described in the DISLIN README file.
  • Create a new Win32 project for a Win32 Console Application in MS Visual Studio.
  • Go to Project -> Properties -> Configuration Properties -> C/C++ -> General and add the DISLIN directory (i.e. c:\dislin) to the field Additional Include Directories for finding the DISLIN header file dislin.h.
  • Add the library disvcm.lib with the full path to the linker properties:

    Project -> Properties -> Configuration Properties -> Linker -> Input

  • Set the runtime library to multi-threaded:

    Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library -> Multi-threaded (/MT)

If you want to use DISLIN from the command line, you can compile and link your program for example with the command:

cl /Ic:\dislin exa_c.c c:\dislin\disvcm.lib user32.lib gdi32.lib

The instructions for generating managed code are:

  • Download and install the DISLIN dotnet distribution dl_10_cs.zip. Define the environment variable DISLIN and modify the PATH variable as described in the DISLIN README file.
  • Create a new project for CLR Console Application in MS Visual Studio.
  • Go to Project -> Properties -> Configuration Properties -> C/C++ -> General and add the DISLIN directory (i.e. c:\dislin) to the field Resolve #using References.
  • Add the DISLIN reference disnet.dll with the full path to the common properties:

    Project -> Properties -> Common Properties -> Add New Reference

If you want to use DISLIN from the command line for generating managed code, you can do it for example with:

cd c:\dislin\examples\cpp
copy c:\dislin\disnet.dll
cpp /clr curve.cpp

How can I use DISLIN with Microsoft Visual C# 2008 Express Edition?

It seems that the C# compiler can only be used from MS Visual Studio and not from the command line in MS Visual C# 2008 Express Edition. Here are the instructions for using C# from MS Visual Studio:

  • Download and install the DISLIN dotnet distribution dl_10_cs.zip. Define the environment variable DISLIN and modify the PATH variable as described in the DISLIN README file.
  • Create a new project for Console Application in MS Visual Studio.
  • Go to Project -> Add Reference and add the DISLIN reference disnet.dll with the full path to this field.

How can I use DISLIN from the Netbeans IDE for C on Linux?

I have tested netbeans 6.9 with DISLIN 10.0 on an OpenSUSE 10.2 system. You need the following settings for DISLIN:

Set Project Configuration -> Customize -> Build -> C Compiler -> Include Directories : /usr/local/dislin

Set Project Configuration -> Customize -> Build -> Linker -> Additional Library Directories: /usr/local/dislin

Set Project Configuration -> Customize -> Build -> Linker -> Libraries: dislin

If you have installed DISLIN in another directory as /usr/local/dislin, you have to change the path above.

How can I use DISLIN from the Netbeans IDE for C on Windows?

Download and install the DISLIN distribution for Cygwin and make the following project settings in the NetNeans IDE:

Set Project Configuration -> Customize -> Build -> C Compiler -> Include Directories : c:/dislin

Set Project Configuration -> Customize -> Build -> Linker -> Libraries -> Add Library File: c:/dislin/discyg.a

Set Project Configuration -> Customize -> Build -> Linker -> Libraries -> Add Library: user32, gdi32

If you have installed DISLIN in another directory as c:\dislin, you have to change the path above.

How can I use DISLIN from R on Linux?

R is a free programming language for statistical computing. R can call directly C and Fortran routines at runtime if they are compiled to a shareable library. A restriction is that the parameters must be passed by address and that the routines can not have return values. Therefore, you should write all you DISLIN statements to a single routine and call this routine from R.

The routine can then be compiled and linked to a shareable library with the command:

R CMD SHLIB myplot.c -L$DISLIN -ldislin

and executed within R with the commands:

R
dyn.load ("myplot.so")
.C ("myplot")

Parameters can also be passed to myplot.

wfl386 link problem of Dislin and OpenWatcom 1.9

The wfl386.exe file of OpenWatcom version 1.9 has a bug. Whenever a library is specified on the wfl386 command line, a bad syntax file is generated for the linker wlink. The given error message looks like:

Error! E3033: file __wfl__.lnk: line(4): directive error near
\'libraryopengl32.lib'
Error: Linker returned a bad status

A patched wfl386.exe is available from the build servers at www.openwatcom.com (see Contributor Resources -> Build Servers -> Build Server 2 -> Browse the result of latest successful build -> binnt -> wfl386.exe)

An alternative workaround is to use wfl386 just for compiling and wcl386 for linking of Dislin programs.

Zur Redakteursansicht