forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using dll reference in main application

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
narayanamoorthy_k



Joined: 19 Jun 2014
Posts: 142
Location: Chennai, IN

PostPosted: Mon Mar 28, 2016 5:26 pm    Post subject: Using dll reference in main application Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group