[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] Using g95 compiler for development of new components



My current stance is that this currently does not work with G95. Most issues I solved except the one described briefly below.

There exists a kind of "main" dll called TrnDll.dll which was written and compiled in intell visual fortran. In that compiled code there are !DEC$ Atributes Dllimport lines which 'decorate' the subroutine or function names as I understand it. Other external dlls, like the one I'm working on, are compiled to be linked to it. The source code I'm trying to use has been modified by me for compilation with the g95 compiler, but the !DEC$ Attributes DllExport line (directly the main subroutine name and some of the function names) is not supported by g95. gcc has, I think, a !gcc$ dllexport statement which is in the gcc 4.x.x directive. gfortran has implimented this.

I would ask you to try gfortran instead, if you're going to experiment. Be aware that you'll probably need to make many modifications to the module files like trnsysfunctions, trnsysdata, trnsysconstants, etc. You're better off using the compilers recommended.

Bear in mind that although you'll get to successfully compile and run the linked code with G95, it doesn't mean that it will work correctly.

On 5 July 2012 11:33, Rafael Guedez <rafaelguedez@gmail.com> wrote:

Hello,

I will like to learn on how to develop new components using the free g95 Fortran compiler. I have the compiler installed in my pc, however I will like to know which changes are needed in the TypeXXX.for skeleton created by TRNSYS (I am using TRNSYS 16)  in order for it to be suitable for g95.

Regards,

Rafael G.


_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users