Silverfrost Forums

Welcome to our forums

problem linking a simple program!

2 Nov 2016 12:28 #18302

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:

!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

2 Nov 2016 1:42 #18304

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.

2 Nov 2016 1:53 #18306

better, but still missing the __ALLOCATE$ ?

K

2 Nov 2016 3:51 #18307

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...

https://forums.silverfrost.com/Forum/Topic/2968&start=15

2 Nov 2016 4:19 #18308

hmmm,

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

K

2 Nov 2016 7:33 #18309

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

3 Nov 2016 11:11 #18311

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

K

4 Nov 2016 10:57 #18314

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

K

4 Nov 2016 11:18 #18315

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.

4 Nov 2016 11:44 #18317
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

4 Nov 2016 11:25 #18321

I get the same as mecej4 with: ftn95 pointest /64 /link /map

There must be a problem with your path ?

The map starts with [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

5 Nov 2016 7:30 #18323

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.

5 Nov 2016 8:46 #18324

Quoted from PaulLaidler 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

7 Nov 2016 7:05 #18326

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.

7 Nov 2016 5:29 #18327

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

thanks to all...

K

11 Nov 2016 4:20 #18353

At the moment the 'one place' is the document NotesOn64BitFtn95.txt that is included in the release. For the next release this information will also be in the help file ftn95.chm.

Please login to reply.