Undefined reference to `linrg_` in IMSL library with gfortran in CodeBlocks

434 views Asked by At

How to use IMSL library in gfortran in Code::Blocks? I had a problem with my program after the building them. The message after building was: undefined reference to `linrg_'

My code is:

Program Fitovanje_krive


Implicit none

integer::i,j,k,n
Integer,parameter::iBrTac=24
Integer,allocatable::vreme(:),potrosnja(:)
Real,allocatable::X(:,:),Y(:,:),P(:,:),Xinv(:,:)


allocate(vreme(iBrTac),potrosnja(iBrTac))


vreme(1:iBrTac)=(/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24/)
potrosnja(1:iBrTac)=(/20,30,20,30,40,50,50,60,70,80,90,100,80,60,50,30,20,40,40,30,30,20,40,40/)

n=10

allocate(X(n+1,n+1),Y(n+1,1),P(n+1,1),Xinv(n+1,n+1))

do i=1,n+1
    do j=1,n+1
        X(i,j)=0.
        Y(i,j)=0.
        do k=1,iBrTac

        X(i,j)=X(i,j)+vreme(k)**(i+j-2)
        Y(i,1)=Y(i,1)+potrosnja(k)*vreme(k)**(i-1)

        end do

    end do
end do

Call Linrg(n+1,X,n+1,Xinv,n+1)

P=matmul(Xinv,Y)

Stop
End program Fitovanje_krive
0

There are 0 answers