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 

Create static libraries?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Fri Apr 13, 2018 7:26 am    Post subject: Re: Reply with quote

DietmarSiepmann wrote:
Moreover, I don't understand why you expandend the test with extra library test_gen2.lib. What do you mean with "that LO acts as LE for the library file"?


My reason for posting the above example was to give an example of successfully generating and using a 64-bit static library. My second test gave an example of multiple object files in the .sl64 file. For this example, if you change use_lib.for to
Code:
!  use_lib.for   to user the library
!
C     Program generated
       integer   ksteu
      call SR1 (ksteu)
      write (*,*) 'The number is :',ksteu
C      call SR2 (ksteu)
      write (*,*) 'The number is :',ksteu
      end

When reviewing the resulting .map file, I found that SR2 was not loaded from test_generated.sl64. This demonstrates that there is a selective load from the .sl64 file, which is one of the key requirements I have of a static library. This example has not demonstrated the use of COMMON or MODULES, which is also needed. (you could compare this approach to using MODULES in a .dll, which makes static libraries very attractive.)

I have not been able to reproduce your problem. Can you identify the difference from my build_gen.bat example and your create_static_libraries.bat and why your example fails ?

John
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Apr 13, 2018 7:41 am    Post subject: Reply with quote

John

Thank you for your examples and testing.

I have managed to create a sample program, using Dietmar's batch file, which (when compiled with /SAVE and /64) fails to load into SLINK64.

This is currently being investigated.
Back to top
View user's profile Send private message AIM Address
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Fri Apr 13, 2018 11:25 am    Post subject: Reply with quote

John,

thanks for your explanation and for your samples.

In the sample I gave in a previous post (and which you probably used) there was a section of declarations and assignments which should consist of 94 declarations of integer variables and 94 assigments. However, I did not mention them explicitly in the code. I used the line consisting of " ... " for abbreviation. In your sample you used "! .... " and hence I was insecure about the numbers of declarations and assignments in your sample. Sorry ... my mistake. But the (big) number of declarations and assignments seemed to be necessary to produce the error. Hence I wrote batch file create_static_libraries.bat which creates source file test_generated.for. Using a positive integer parameter when executing create_static_libraries.bat you control the number of declarations and assignments in file test_generated.for. Thus I wanted to point out that you probably would need more than 4 declarations and assignments (and maybe on your test environment even more then 94) to run into the error I mentioned.

Regards,
Dietmar
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Apr 14, 2018 8:37 am    Post subject: Reply with quote

This failure has now been fixed and the new version of SLINK64 can be downloaded from here...

https://www.dropbox.com/s/kl7roi3twlivy2g/Slink64.zip?dl=0
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Sat Apr 14, 2018 1:53 pm    Post subject: Reply with quote

Paul,

Thanks for the update, it fixes that problem.
I shall test more soon.

John
Back to top
View user's profile Send private message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Mon Apr 16, 2018 10:02 am    Post subject: Reply with quote

Paul,

the version of slink64.exe of the download works ok for my samples and creates the static libraries as expected.

This helps very much because our building process makes use of static libraries Smile

Thank you very much.

Regards,
Dietmar
Back to top
View user's profile Send private message
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 Previous  1, 2
Page 2 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