View previous topic :: View next topic |
Author |
Message |
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Wed Nov 02, 2016 1:28 pm Post subject: problem linking a simple program! |
|
|
hi,
when i try to build this exe under ftn64, i get the following errors.
The following symbols were not defined:
__record_program_storage
__ALLOCATE$
the link script is:
lo poitest.obj
file
and the source code is:
Code: | !ftn95$free
program poitest
integer, pointer :: ival2, ival1
integer(kind=7) :: iaddr1, iaddr2
character*40, pointer :: c40, c41
interface
subroutine ipoint(ival,iadd)
integer(kind=7) :: iadd
integer, pointer :: ival
end subroutine
subroutine spoint(sval,iadd)
integer(kind=7) :: iadd
character*(*), pointer :: sval
end subroutine
end interface
allocate (c40, c41, ival1, ival2)
c40 = 'string'
c41 = ' '
iaddr1 = loc(c40)
ival1 = 7
ival2 = 0
iaddr2 = loc(ival1)
call spoint (c41,iaddr1)
call ipoint (ival2,iaddr2)
write(*,*) ival2, ' ', c41
end
subroutine ipoint (ival,iadd)
integer, pointer :: ival
integer(kind=7) :: iadd
jj=2
loc(ival) = IADD
end
subroutine spoint (sval,iadd)
character*(*), pointer :: sval
integer(kind=7) :: iadd
jj=2
LOC(SVAL) = iadd
end
|
what am i missing?
K |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Wed Nov 02, 2016 2:42 pm Post subject: |
|
|
It looks like your SLINK64 is accessing a Silverfrost DLL from a different (earlier) release.
__record_program_storage is exported by salflibc64.dll and maybe the one that you are accessing is an old version. |
|
Back to top |
|
|
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Wed Nov 02, 2016 2:53 pm Post subject: |
|
|
better, but still missing the __ALLOCATE$ ?
K |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
|
Back to top |
|
|
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Wed Nov 02, 2016 5:19 pm Post subject: |
|
|
hmmm,
the compiler wont run because the 32bit Salflibc.dll gets automatically quarantined by my virus checker (Avira)...
K |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2391 Location: Yateley, Hants, UK
|
Posted: Wed Nov 02, 2016 8:33 pm Post subject: |
|
|
I had the Avast virus checker that wouldn't let me run my own programs because it didn't recognise the publisher. MacAfee and Kaspersky have no problems.
Eddie |
|
Back to top |
|
|
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Thu Nov 03, 2016 12:11 pm Post subject: |
|
|
Avira have acknowledged that it's a false positive - i'll retry following the next update...
K |
|
Back to top |
|
|
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Fri Nov 04, 2016 11:57 am Post subject: |
|
|
ok, retried following update from Avira, but still get __ALLOCATE$ as a missing routine...
K |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1895
|
Posted: Fri Nov 04, 2016 12:18 pm Post subject: |
|
|
Using the 8.05 compiler, I find that I can build the program with no errors whether I use the 32-bit mode or the 64-bit mode. Perhaps you could ascertain and report the FTN95 DLL versions and file sizes to help investigate the problem.
__ALLOCATE$ is an exported routine in CLEARWIN64.DLL. |
|
Back to top |
|
|
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Fri Nov 04, 2016 12:44 pm Post subject: |
|
|
Code: | 02/11/2016 04:16 PM 2,376,704 clearwin64.dll
02/11/2016 04:16 PM 445,440 SALFLIBC64.DLL
04/11/2016 10:54 AM 2,275,328 salflibc.dll
17/06/2016 03:40 PM 2,159,104 ftn95.exe
17/06/2016 03:45 PM 53,760 Slink64.exe
C:\WIN32APP\salford>ftn95/ver
Silverfrost FTN95/.NET Copyright (C) 1993-2016 Silverfrost Ltd
---------------------------------------------------------------
Version: 8.05.0
Built: Fri Jun 17 16:40:04 2016
Operating System: Microsoft .NET on Windows NT CPU:
Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz Model 5 Step 5
CPU Features: MMX, SSE, SSE2, x86-64
|
K |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2560 Location: Sydney
|
Posted: Sat Nov 05, 2016 12:25 am Post subject: |
|
|
I get the same as mecej4 with:
ftn95 pointest /64 /link /map
There must be a problem with your path ?
The map starts with Code: | [SLINK64 v1.7, Copyright (c) Silverfrost Ltd. 2015-2016]
Link map of c:\temp\forum\pointest.EXE built on Saturday, 05 November 2016 at 10:14:04
Entry: POITEST
__RuntimeError - SALFLIBC64.DLL
__ALLOCATE$ - CLEARWIN64.DLL
__save_rbp - SALFLIBC64.DLL
__ExitFTN95 - CLEARWIN64.DLL
__record_program_storage - SALFLIBC64.DLL
ExitProcess - KERNEL32.DLL
WSF1@@ - CLEARWIN64.DLL
GlobalAlloc - KERNEL32.DLL
|
I used 17-Jul-16 clearwin64.dll
I will load the latest FTN95 version from this thread and report back.
John |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Sat Nov 05, 2016 8:30 am Post subject: |
|
|
Kenny
Have you noted the comment that __ALLOCATE$ is exported by clearwin64.dll?
You must be accessing a copy of clearwin64.dll that does not match with the FTN95 that you are using. |
|
Back to top |
|
|
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Sat Nov 05, 2016 9:46 am Post subject: Re: |
|
|
PaulLaidler wrote: | Kenny
Have you noted the comment that __ALLOCATE$ is exported by clearwin64.dll?
You must be accessing a copy of clearwin64.dll that does not match with the FTN95 that you are using. |
yep, in all the chaos surrounding the virus problem (same thing now happens with SALFLIBC64.DLL!) i hadn't spotted the significance of the comment about where ALLOCATE was coming from - so am i to understand that, even if i'm not explicitly using Clearwin commands, i will still need to package Clearwin64.dll with my apps?
Thanks to all
K |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Mon Nov 07, 2016 8:05 am Post subject: |
|
|
Yes. For 64 bit FTN95 applications and DLLs, you will need to distribute both salflibc64.dll and clearwin64.dll regardless of whether you are using ClearWin+ or not. |
|
Back to top |
|
|
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Mon Nov 07, 2016 6:29 pm Post subject: |
|
|
OK, all virus check reported as clean now and the program works.
thanks to all...
K |
|
Back to top |
|
|
|