[TRNSYS-users] A TYPE calling another TYPE

Edward Halawa Edward.Halawa at unisa.edu.au
Wed Apr 23 23:26:31 PDT 2008


Thanks, David and Christian, for your explanation. I wasn't aware before
that a external dll can have any number of types in it (I thought it
only could hold one, which is not a problem if a type doesn't call
another type). I am now trying this but I haven't succeeded yet. An
error message appears as follows:

Fatal Error at time   :  1.000000
Generated by Unit     :     1
Generated by Type     :   201
TRNSYS Message    105 : A TYPE was called in the TRNSYS input file but
was either not linked into trndll.dll or was not found in an external
dll. A dummy subroutine was called in its place. Please link the TYPE or
remove it from the input file
Reported information  : Not available

There is only one  fatal error, and no mention of TYPE 202, which is
called by Type 201. (I put MyDll.dll or TYPE201.dll in
..\Trnsys16\UserLib\ReleaseDLLs directory).

One other question: Can I name this dll "TYPE201" (with 2 types in it:
TYPE201.for and TYPE202.for)? Or should I give it a different name (such
as MyDll)? I'm trying both, so far it hasn't work.

Regards,

ehalawa


-----Original Message-----
From: Technical Support [mailto:TechSupport at tess-inc.com] 
Sent: Wednesday, 23 April 2008 12:20 AM
To: Edward Halawa; trnsys-users at engr.wisc.edu
Subject: Re: [TRNSYS-users] A TYPE calling another TYPE

Edward,
  I am not sure that I follow what you are trying to do. The way that
TRNSYS 16 is structured, Fortran code (*.for) files are compiled and
then linked together to form dynamic link libraries (*.dll files). A
Fortran library file (*.lib) is one of the byproducts of the dll linking
procedure. The TRNSYS 16 kernel and standard Types are compiled and
linked together to form the TRNDll.dll. If you want to add more Types to
that *.dll, you have to recreate it (meaning that you have to rebuild
the TRNDll.dll). As Christian pointed out, TRNSYS 16 is designed to look
for and load any *.dll files that it finds in the
..\Trnsys16\UserLib\ReleaseDLLs directory. The external DLLs can have
any number of Types in them so if you have a Type201 that calls Type202,
you could put both Type201.for and Type202.for into the same Fortran
project and create a single DLL from them. As long as the DLL is placed
in the correct directory and as long as both of the Types are exported
correctly (see the 08-Programmer's Guide manual for detailed
instructions) your components should be accessible from the TRNDll.dll
without having to rebuild TRNDll.dll.
Kind regards,
 David




Technical Support Team
Thermal Energy System Specialists, LLC
2916 Marketplace Dr, Suite 104
Madison, WI 53719
techsupport at tess-inc.com

>----- Original Message -----
Subject: [TRNSYS-users]  A TYPE calling another TYPE
Date: Mon, April 21, 2008 19:53
From: "Edward Halawa" <Edward.Halawa at unisa.edu.au>

> Dear all,
>
> I want to include a dll file created in FORTRAN into a TRNDLL.lib.
This
> dll file (called TYPE201) also calls another dll file (TYPE202). How
can
> I link these two dlls to TRNDLL.lib without rebuilding TRNDll.lib?
> (Note: TYPE202.for is not local to TYPE201.for).
>
> I appreciate you help.
>
> ehalawa
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at engr.wisc.edu
> https://www.cae.wisc.edu/mailman/listinfo/trnsys-users
>
>
>
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users at engr.wisc.edu
https://www.cae.wisc.edu/mailman/listinfo/trnsys-users




More information about the TRNSYS-users mailing list