forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem linking a simple program!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
KennyT



Joined: 02 Aug 2005
Posts: 317

PostPosted: Wed Nov 02, 2016 1:28 pm    Post subject: problem linking a simple program! Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Nov 02, 2016 2:42 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 317

PostPosted: Wed Nov 02, 2016 2:53 pm    Post subject: Reply with quote

better, but still missing the __ALLOCATE$ ?

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Nov 02, 2016 4:51 pm    Post subject: Reply with quote

I still think that there must be a miss-match.

If you are careful to create a backup of the Silverfrost DLLs then you could try a new set from the last post on this thread...

http://forums.silverfrost.com/viewtopic.php?t=3357&start=15
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 317

PostPosted: Wed Nov 02, 2016 5:19 pm    Post subject: Reply with quote

hmmm,

the compiler wont run because the 32bit Salflibc.dll gets automatically quarantined by my virus checker (Avira)...

K
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Wed Nov 02, 2016 8:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
KennyT



Joined: 02 Aug 2005
Posts: 317

PostPosted: Thu Nov 03, 2016 12:11 pm    Post subject: Reply with quote

Avira have acknowledged that it's a false positive - i'll retry following the next update...

K
Back to top
View user's profile Send private message Visit poster's website
KennyT



Joined: 02 Aug 2005
Posts: 317

PostPosted: Fri Nov 04, 2016 11:57 am    Post subject: Reply with quote

ok, retried following update from Avira, but still get __ALLOCATE$ as a missing routine...

K
Back to top
View user's profile Send private message Visit poster's website
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Nov 04, 2016 12:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
KennyT



Joined: 02 Aug 2005
Posts: 317

PostPosted: Fri Nov 04, 2016 12:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Sat Nov 05, 2016 12:25 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Nov 05, 2016 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 317

PostPosted: Sat Nov 05, 2016 9:46 am    Post subject: Re: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Nov 07, 2016 8:05 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 317

PostPosted: Mon Nov 07, 2016 6:29 pm    Post subject: Reply with quote

OK, all virus check reported as clean now and the program works.

thanks to all...

K
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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