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 with Simply Fortran on Windows?

The Dislin distribution for Mingw and Windows 32-bit in the file dl_10_mg.zip can be used for Simply Fortran. Here is what you have to to:

  • open a command prompt and change to your DISLIN\gf directory. The command gfortran -c dislin.f90 creates the new module file dislin.mod corresponding to your gfortran version.
  • create a new command line project in Simply Fortran and make the following project settings: Project -> Options -> Compiler Flags
    Fortran Compiler: -I\dislin\gf
    Linker: \dislin\dismg.a -luser32 -lgdi32 -lopengl32

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.

 
loading content