View previous topic :: View next topic |
Author |
Message |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Wed Aug 03, 2011 10:26 am Post subject: Bug in the .NET version of the compiler, I think |
|
|
I think there's a bug in the "LIBRARY" directive, when it's placed in the source code. If I add a line:
LIBRARY "routines.dll"
to my source code (I've tried at the top of the source and within the relevant subroutine block) then my ASSEMBLY_EXTERNAL call fails, hinting that I've failed to include a library directive.
But if I add
/LIBRARY routines.dll
to the FTN95 command line, then it works.
If I have a large number of .NET dlls to reference, I'd rather not have to add them to the compile command in a long list for every compilation, or have I misunderstood what I'm supposed to do?
K |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8257 Location: Salford, UK
|
Posted: Wed Aug 03, 2011 11:46 am Post subject: |
|
|
I can check out the use of LIBRARY under .NET.
Otherwise there are various ways to handle a long command line including using a project in Plato or Visual Studio or a batch file from a command line. For example, in Visual Studio you can create a project and then "Add References" from the Project Explorer window. |
|
Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Wed Aug 03, 2011 12:46 pm Post subject: |
|
|
I'm just using a bat file, not VS or Plato. What's the syntax to reference a long list of FTN95 command options, is there an "@" switch (I can't see it in the help)?
K |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8257 Location: Salford, UK
|
Posted: Wed Aug 03, 2011 4:32 pm Post subject: |
|
|
There is no @ feature for the FTN95 command line but you could try creating FTN95.cfg in the local directory. In theory FTN95.cfg is created automatically when you call
FTN95 /config
but you may be able to edit FTN95.cfg manually once it has be created and you can see how switches are arranged.
If you use a project in Plato or Visual Studio then the command line switches become properties of the project and they are set once and for all via various interactive dialogs. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8257 Location: Salford, UK
|
Posted: Wed Aug 03, 2011 4:46 pm Post subject: |
|
|
Under .NET, the normal usage of the LIBRARY directive is to access system dlls in the GAC. I am not sure what happens for your own local dlls but you could try providing the full path to see if this makes any difference.
Under Win32, the LIBRARY directive is only effective when using /LGO or /LINK and the information is simply passed down to the linker.
Under both Win32 and .NET you can also use /REFERENCE on the command line but again the usage varies. |
|
Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Wed Aug 03, 2011 5:14 pm Post subject: |
|
|
OK, I found the issue!
If I start the "LIBRARY" statement in column 1, it fails. If I indent it, it works, despite the use of "!ftn95$free".
K |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8257 Location: Salford, UK
|
Posted: Wed Aug 03, 2011 10:07 pm Post subject: |
|
|
Perhaps the comment embedded directive is case-sensitive.
Try
!FTN95$FREE
In any case there is something odd here. Why is there no error report?
I will check this out sometime early next week. |
|
Back to top |
|
 |
KennyT
Joined: 02 Aug 2005 Posts: 320
|
Posted: Fri Aug 05, 2011 8:44 am Post subject: |
|
|
OK - let me know if you need example code/dlls.
K |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8257 Location: Salford, UK
|
Posted: Sat Aug 06, 2011 8:02 am Post subject: |
|
|
This behaviour is due to a bug in the compiler that I have now fixed for the next release. Until then you will need to start typing "LIBRARY" in column 7 (that when the default file extension is for fixed format Fortran and you use the comment embedded directive to make it free). |
|
Back to top |
|
 |
|