|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Thu May 25, 2006 10:09 am Post subject: Referencing DLL |
|
|
Hi
I posted a question about creating a library of subroutines and functions and based on the very helpful advice I received, I created a DLL containing the subprograms which I needed.
I referenced this DLL into another project and tried compiling and building the project.
This worked fine but when I tried running the project, the black "Plato IDE" screen appeared with the text "press RETURN to close window".
There are several variables which were meant to be read at runtime so I don't understand what's happening here. Did it simply not run?
When I remove the reference however, it runs as I'd expect it to and these variables are read in (but of course it returns an error message as soon as it encounters a subroutine which is no longer referenced).
Why does it behave differently without the reference attached?
ps. On a separate note, I attempted to call a subroutine taking 7 arguments, one of which was labelled "OPTIONAL". I passed in 6 arguments, leaving out the optional one but I got a message saying "Attempt to call a routine with 6 arguments when 7 required". Surely the optional statement within the routine should take care of this.
Thanks
Mikhail Kalashnikov |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu May 25, 2006 11:50 am Post subject: Referencing DLL |
|
|
Mikhail
If you are reading your data from a file then you should OPEN with STATUS="OLD" to ensure that the file is being found. The IOSTAT value will tell you.
Regarding optional arguments, I need to correct the information that I gave you before...
If a call is made to an external subprogram that uses OPTIONAL or KEYWORD arguments or passes arrays that are "assumed shape" (i.e. use a colon rather than a star) then you must provide an INTERFACE that declares the subprogram.
On another issue, in general you should test your routines before putting them in a DLL and then use Release mode rather than Debug or Checkmate to build the DLL. |
|
Back to top |
|
|
|
|
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
|