Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

DISLIN

nichols__john
Beginner
1,250 Views

Dear Steve:

DISLIN is a neat program for drawing plots written by Helmet Michaels in Germany. The program is free for non -commercial use. I bought the really excellent manual whihc explains how to install the libraries.  

The library files are installed in a folder called c:\DISLIN 

The Module File for DISLIN DISLIN.F90 and DISLIN.MOD is stored in c:\DISLIN\IFC

I set the path command to point to the point to the correct places

Set the DISLIN environment variable to c:\dislin and include
     c:\dislin\win in your path. If you have installed DISLIN in a
     different directory, you have to use that directory for the 
     environment variables above.

 

I then used a VS 2012 Command prompt to run the sample program provided with DISLIN

I also tried setting up a VS 2012 solution and run it from VS.  

I get a variety of errors depending on how I configure the VS properties, but the main and first error is ifconsol.lib cannot open file.  Helmut suggested the following - this morning 

John,

the ifconsol.lib file is part of the Intel Fortran compiler. It seems that the Microsoft linker does not find
this library. I'm just using Visual Studio 2010, where I don't have such a problem. What happens when you
replace the link command by the ifort command. For example:

              ifort /c /Ic:\dislin\ifc   exa_f90.f90                                                   for compiling
              ifort exa_f90.obj  c:\dislin\disifl.lib  gdi32.lib user32.lib              for linking

Best regards,

Helmut

 

I keep getting the same error - as shown on the attached image  whether I use the command line or VS.   - I have set the complier variables using the BATCH file.  

 

 

I am running on a WINDOWS 10 machine - using VS 2012 and the latest Intel Complier - I am not having trouble running any of my other Fortran programs using this system.

 

Your thoughts would be appreciated - I realize it is something simple - but I am lost

 

JMNCapture.PNG

0 Kudos
11 Replies
Steven_L_Intel1
Employee
1,250 Views

I see that you are building in a folder that is under Program Files (x86). That will cause all sorts of difficult to understand problems due to Windows restrictions. Try copying that Examples folder to your desktop and try again there.  Also, it would be useful for you to show the output of "set lib" if you still have the problem. (I would also want to see the output from when you first opened the command prompt session that invoked the compiler .bat file.)

0 Kudos
nichols__john
Beginner
1,250 Views

Steve:

I copied the files to the desktop.

I reran the ifort and the lib command

I also ran set lib and the results are all shown on the attached png file.

Still got the same error.

Would the version of the DISLIN lib matter?

Thanks

John

0 Kudos
Steven_L_Intel1
Employee
1,250 Views

The Intel compiler library folders are not in the LIB list. How did you start this command session?

0 Kudos
nichols__john
Beginner
1,250 Views

Steve:

Start

All apps

VS 2012 Manu

Developer Command Prompt for VS 2012

Changed to the correct directory using CD etc...

and ran IFORT

I get the same error from inside VS 2012

JOhn

0 Kudos
mecej4
Honored Contributor III
1,250 Views

That shortcut gets you a command line environment for using just the MS C/C++ compiler. You should have used All_Apps -Intel_Parallel_Studio_XE_2015 - Compiler_and...

0 Kudos
Steven_L_Intel1
Employee
1,250 Views

What mecej4 said. I'm not sure how you even got the path to ifort unless you added it manually.

0 Kudos
nichols__john
Beginner
1,250 Views

Dear mecej4:

Thanks again.  You are a life saver.

Dear Steve:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

John,

the ifconsol.lib file is part of the Intel Fortran compiler. It seems that the Microsoft linker does not find
this library. I'm just using Visual Studio 2010, where I don't have such a problem. What happens when you
replace the link command by the ifort command. For example:

              ifort /c /Ic:\dislin\ifc   exa_f90.f90                                                   for compiling
              ifort exa_f90.obj  c:\dislin\disifl.lib  gdi32.lib user32.lib              for linking

Best regards,

Helmut

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

THIS DID NOT WORK _ BUT:

According to the notes:

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).

I am using Intel Fortran 15 - so I swapped to the m version of the library and it worked perfectly

       disifm.lib and disifm_d.lib are compiled for using libcmt  instead of libc.

Does this note about libcmt mean something? 

If you want to link for Multithreaded DLL runtime libraries (/MD), you can use the Dislin libraries
        disifd.lib (or disifd_d.lib).
       
      - If your compiler version does not recognize the format of the  Dislin module file 'dislin.mod', you have to recompile the file
        'dislin.f90' in the directory DISLIN\ifc with your compiler  version (i.e. ifort -c dislin.f90). 'dislin.mod' is created
        with Intel Visual Fortran 9.1.

I used the 32 bit version and switched the disifl command for disifm and it compiled nicely.

 

As soon as I tried 64 bit - it went to hell in a hand basket. 

How do I compile the program in VS 2012? 

it appears I can only do 32 bit?

Thanks

JMN
 

 

0 Kudos
Steven_L_Intel1
Employee
1,250 Views

libc is the single-threaded static Visual C++ library - it went away in VS2005. libcmt,lib is the thread-safe alternative.

You never said what went wrong when you built for 64 bits, so I don't know what to tell you. Maybe you installed only the 32-bit compiler. Maybe you don't know how to select a 64-bit configuration. Maybe you are not using a 64-bit DISLIN library.

0 Kudos
nichols__john
Beginner
1,250 Views

Steve:

64 bit builds.

I used the Intel provided 64 bit development environment and did the same procedure as before and got a whole lot of unresolved references on linking. I tried the different libraries.

I am assuming and I will ask Helmut - but the libraries are 32 bit only.

They have real and double precision libraries  - I know bad names - but that is what Helmut used so I can try that variant.

But for VS 2012 - I set up the DISLIN Module file in with the example file in a VS solution folder. Set the additional library to the c:\dislin\disifm.lib and ran as 32 bit build. I get a stack of errors like this one

Error 1  error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR110D.dll) LIBCMT.lib(invarg.obj) 
 

Any ideas?

John

 

0 Kudos
Steven_L_Intel1
Employee
1,250 Views

Ok - you have "mixed C library syndrome". A library you're linking to was built for one form (static vs. DLL) and your project wants another. My guess is that your project is using the debug DLL library - try changing it to "Multithreaded (/MT)" and see what happens.

0 Kudos
mecej4
Honored Contributor III
1,250 Views

DISLIN has both 32-bit and 64-bit distributions. You should note which version you have, and use the matching (as to bit-ness) version of IFort. I tried one of the examples using IFort 15.0.2, and it worked fine with no problems -- I tried only the 64-bit version.

0 Kudos
Reply