narayanamoorthy_k
Joined: 19 Jun 2014 Posts: 142 Location: Chennai, IN
|
Posted: Mon Mar 28, 2016 5:26 pm Post subject: Using dll reference in main application |
|
|
Hello
I am creating a common function in DLL which includes few published functions.
I have created a Main Program, which needs to refer to that DLL to use the published function.
May I know how will I do this, in our Silverfrost FTN95 Express. I tried with very simple function viz sending two variables and returns the sum of those two variables.
Here is the code that I used.
Main program
Code: |
program main
include "ModuleDll"
real :: a, b, c, d
a= 5.0
b= 2.
d = calresult(a,b,c)
print*, 'Printing the received result:'
print*, c
end program main
|
Reference function in DLL project
.
Code: |
module ModuleDll
contains
real function calresult ( a, b, c)
real, intent(in) :: a, b
real, intent(out) :: c
print*, 'The received inputs are :'
print*, a, b, c
c = a*b
end function calresult
end module ModuleDll
|
I have made this ModuleDll (I created this as a DLL file and referred this in Main application project Reference in Project Explorer)
But the problem here is that this calresult() is not published in the main program.
I am trying to create a common library function, which can be used by any other main application, by making the reference to those libraries.
Some what I am not clear with the configurations that I have to use it in FTN95 Express. Pls. help how to establish the skeleton structure here in the program.
Thank you.. _________________ Thanks and Regards
Moorthy |
|