View previous topic :: View next topic |
Author |
Message |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Fri Apr 13, 2018 7:26 am Post subject: Re: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Apr 13, 2018 7:41 am Post subject: |
|
|
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 |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Fri Apr 13, 2018 11:25 am Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Sat Apr 14, 2018 1:53 pm Post subject: |
|
|
Paul,
Thanks for the update, it fixes that problem.
I shall test more soon.
John |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Mon Apr 16, 2018 10:02 am Post subject: |
|
|
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
Thank you very much.
Regards,
Dietmar |
|
Back to top |
|
|
|