View previous topic :: View next topic |
Author |
Message |
steveDoyle
Joined: 04 Sep 2009 Posts: 112 Location: Manchester
|
Posted: Fri Jul 05, 2024 9:42 am Post subject: 64 bit dll |
|
|
Hi i'm trying to convert a functioning 32 bit DLL into a 64Bit DLL that can be called from Excel VBA
File1
Program test
call init_function
end
file2
F_STDCALL subroutine init_function
write(*,*) 'hello'
end
ftn95 /64 file1.for file2.for
slink64
dll
lo file2
file mydll.dll
slink64
lo file1
lo mydll.dll
file test.exe
when i execute test.exe i get:-
following symbol not defined
init_function in test.exe
In the 32bit version when creating the DLL i would use EXPORT init_function in SLINK but from the on-line documentation all the functions are exported in SLINK64
all guidance appreciated
Steve |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1226 Location: Morrison, CO, USA
|
Posted: Fri Jul 05, 2024 12:15 pm Post subject: |
|
|
The F_STDCALL is unnecessary for 64-bit. It might be superfluous for 32-bit. I did nothing to my FTN sources to get a 64-bit DLL created. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8025 Location: Salford, UK
|
Posted: Fri Jul 05, 2024 1:21 pm Post subject: |
|
|
Steve
F_STDCALL is not applicable for for /64 and ought to be ignored by FTN95.
I have confirmed that your test case does not work and I have logged this as needing fixing.
In the meantime you should omit F_STDCALL for /64. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8025 Location: Salford, UK
|
Posted: Fri Jul 05, 2024 1:41 pm Post subject: |
|
|
This has now been fixed for the next release of FTN95. |
|
Back to top |
|
|
steveDoyle
Joined: 04 Sep 2009 Posts: 112 Location: Manchester
|
Posted: Sat Jul 06, 2024 12:17 pm Post subject: |
|
|
Paul
thanks for the quick response
I will remove the F_STDCALL for the 64bit version of the DLL
Am i correct in the assumption that the default is EXPORTALL when linking the DLL or is there a way to control which functions are exposed by the DLL
What i'm actually trying to do is to permit Excel to act as a front end to a large application where it only need to send data and request specific analysis. There are 5,000+ subroutines in the application which would be needlessly exposed with EXPORTALL
regards
steve |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8025 Location: Salford, UK
|
Posted: Sat Jul 06, 2024 4:28 pm Post subject: |
|
|
Steve
EXPORTALL is the default and as far as I know SLINK64 does not allow the user to limit the exports. But I will have to check this with the author. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8025 Location: Salford, UK
|
Posted: Thu Jul 18, 2024 8:21 am Post subject: |
|
|
I can now confirm that SLINK64 does not currently provide an alternative to "ExportAll". |
|
Back to top |
|
|
|