- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've written a a DLL containing a single module, Now I can't figure out what DLLIMPORT statements are needed to use the dang thing. I've put in the lib filename in the link settings of the project.
The mod & lib files are in the project directory.
If put in the USE statement by itself, it complains about unresolved externals.
Inclduing the DLLIMPORT,results in the "attributes" of individual var's conflicting with that in USE.
If I put in DLLIMPORT by itself it really blows gas... and DLLIMPOIRT on the module name itself seems out of the question!
Is this even supposed to be possible?
Please note the (?)'s
in CLIENT
use M (?)
!DEC$ DLLIMPORT A,B (?) !how does it know which DLL to get these from?
!DEC$ DLLIMPORT X (?)
allocate (A(n))
call X
...
in DLL:
module M !(is there a dllexport statement needed for M?)
real, allocatable:: A(:) ! the client will allocate this, is this form ok(?)
dllexport A (?)
integer B !(what is the export statment for A and B??)
dllexport B (?)
contains
subroutine X
dllexport X ! I assume this is correct as usual (?)
end sub X
end module
The mod & lib files are in the project directory.
If put in the USE statement by itself, it complains about unresolved externals.
Inclduing the DLLIMPORT,results in the "attributes" of individual var's conflicting with that in USE.
If I put in DLLIMPORT by itself it really blows gas... and DLLIMPOIRT on the module name itself seems out of the question!
Is this even supposed to be possible?
Please note the (?)'s
in CLIENT
use M (?)
!DEC$ DLLIMPORT A,B (?) !how does it know which DLL to get these from?
!DEC$ DLLIMPORT X (?)
allocate (A(n))
call X
...
in DLL:
module M !(is there a dllexport statement needed for M?)
real, allocatable:: A(:) ! the client will allocate this, is this form ok(?)
dllexport A (?)
integer B !(what is the export statment for A and B??)
dllexport B (?)
contains
subroutine X
dllexport X ! I assume this is correct as usual (?)
end sub X
end module
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page