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

Add IMSL libraries to a Visual Studio Project

Alessandro_D_
New Contributor I
670 Views

I have the IMSL libraries on my PC and I manage to run the program below in VS Code, using a makefile. However I don't manage to add the libraries when I use Visual studio (the integration).

Can someone explain me how I have to modify the project properties to add the IMSL libraries. 

The attached figures show what I have done so far: go to properties>linker>general>additional library directories and then add the following three lines

C:\Program Files (x86)\RogueWave\imsl\fnl-2024.1.0\win100in240x64\include\dll

C:\Program Files (x86)\RogueWave\imsl\fnl-2024.1.0\win100in240x64\include\static

C:\Program Files (x86)\RogueWave\imsl\fnl-2024.1.0\win100in240x64\lib

 

but I get the following error:

 

Error in opening the compiled module file. Check INCLUDE paths [DENSE_LP_INT]

Cannot open include file 'link_fnl_static.h'

 

Thanks!

 

Capture.PNGCapture2.PNG

 

program test_solve_lin
USE DENSE_LP_INT, only: DENSE_LP
include 'link_fnl_static.h'
IMPLICIT NONE

INTEGER, PARAMETER :: M=4, NVAR=6
INTEGER :: i
REAL(8) :: OBJ
REAL(8) :: A(M, NVAR), B(M), C(NVAR), XSOL(NVAR), DSOL(M), BL(M), BU(M)
INTEGER :: IRTYPE(M)
! TODO: Modernize this old crap
DATA A/1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, -1, &
0, 0, 0, 0, 1, 0, 0, 0, 0, 1/

DATA B/1.5, 0.5, 1.0, 1.0/

DATA C/-1.0, -3.0, 0.0, 0.0, 0.0, 0.0/

DATA BL/1.5, 0.5, 1.0, 1.0/

DATA BU/M*-1.D30/

!DATA IRTYPE/M*0/

IRTYPE(:) = 0

! Solve the LP problem

write(*,*) "-----------------------------------------"
write(*,*) "DENSE_LP, from IMSL Fortran Library"
write(*,*) "-----------------------------------------"

CALL DENSE_LP(A, BL, BU, C, IRTYPE, OBJ, XSOL, DSOL)

write(*,*) 'Objective = ', OBJ
write(*,*) 'Solution = '
do i = 1, NVAR
write(*,'(X,I,X,F9.4)') i, XSOL(i)
enddo

end program test_solve_lin

```

0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
647 Views

You'll need to take this up with the IMSL support people. However, I'll suggest that the paths that have "/include" should instead go in Fortran > General > Additional Include Directories, and that you really want only one of those depending on whether you want to link to the static or DLL form of the IMSL libraries.

Mike6723
Novice
320 Views

Hi Alessandro,

Step by step instructions are provided in the section, "Using FNL with Visual Studio" within the IMSL FNL README file (https://help.imsl.com/fortran/common/README.html).

 

Regards,

--Mike

Reply