| Thread Closed |
Accessing Fortran Modules within a Fortran library from Fortran |
Share Thread |
| Jul12-08, 03:31 PM | #1 |
|
|
Accessing Fortran Modules within a Fortran library from Fortran
Yes, a lot of FORTRAN, but here goes.
I am very new to creating libraries so give me some credit. I have a main fortran code which calls a library. LibraryCode.f90 program LibraryCode implicit none character(len=4)::string string = 'here' print*, string call LibraryCall(string) pause end program LibraryCode and in my library i have the subroutine Library.f90 subroutine LibraryCall(string) !DEC$ ATTRIBUTES DLLEXPORT::LibraryCall character(len=4)::string print*, string end subroutine LibraryCall I can compile this just fine, it creates the dll and I can access it from the LibraryCode.f90 just fine. However, I need to wrap this in a module, i.e. module Library subroutine LibraryCall(string) !DEC$ ATTRIBUTES DLLEXPORT::LibraryCall character(len=4)::string print*, string end subroutine LibraryCall end module Library When I don't have the module there everything works fine, but when I do, I get unresolved external. I also have several functions and files. Most of them are just function calls. Some of them use the module I would like to add therefore I know it's compiled into the dll, however I cannot access the parameters in the module directly. I have tried using things like module Library !DEC$ ATTRIBUTES DLLEXPORT::Library but the compiler just tells me this is useless and it doesn't find the module's data. Any help or clarification needed and I would be willing to provide it. |
| Thread Closed |
Similar discussions for: Accessing Fortran Modules within a Fortran library from Fortran
|
||||
| Thread | Forum | Replies | ||
| Help with Fortran 90 | Programming & Comp Sci | 0 | ||
| fortran help | Programming & Comp Sci | 7 | ||
| Fortran v.s. Visual Fortran | Programming & Comp Sci | 0 | ||
| I need some fortran 90 help | Programming & Comp Sci | 1 | ||
| fortran | Computing & Technology | 23 | ||