Dear Matt,<br><br>thanks very much for the fast response and solution. Using this approach seems to work fine; I have since built several DLLs that all function as expected.<br><br>Does it matter which TRNDll.lib file I include in the solution before building? I've successfully used both the one that came with my version of TRNSYS (in Exe directory), and the one available with the ivf10p1 solution zip. Maybe my Types are not complex enough to make a difference, but I would appreciate knowing whether there are any sensitivities, for future reference.<br>

<br>Kind regards,<br>Leon Gaillard<br><br><div class="gmail_quote">On 15 March 2011 20:42, Matt Duffy <span dir="ltr"><<a href="mailto:duffy@tess-inc.com">duffy@tess-inc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>Dear Leon,<br><br>If simply making an external DLL, please use the IVF solution for 10.1 available from the TRNSYS16 Tutorials and Examples website.<br><a href="http://sel.me.wisc.edu/trnsys/downloads/tutorials_and_examples/ivf10p1.zip" target="_blank">http://sel.me.wisc.edu/trnsys/downloads/tutorials_and_examples/ivf10p1.zip</a><br>

<br><br>You will have to import that solution into IVF 11.1 to use it. Upon compiling your source code, it should place the MyType.dll externall DLL in the proper directory. I used it all the time when I compiled v16 types.<br>

<br>Best regards,<br><br>Matt Duffy<br><br><div style="background-repeat: repeat-x;"><div><div></div><div class="h5"><b>----- Original Message -----</b><br><b>From:</b> "Leon Gaillard" <<a href="mailto:leon.gaillard@univ-savoie.fr" target="_blank">leon.gaillard@univ-savoie.fr</a>> <br>

<b>Sent:</b> Mon, March 14, 2011 5:52<br><b>Subject:!
 </b> [TRNSYS-users] Rebuild TRNDll.dll using IVF, runtime errors:"cannot find TNRDll";"forrtl: severe 151 allocatable array is already allocated"<br><br></div></div><table cellspacing="5" width="100%">

<tbody><tr><td><div><div><div></div><div class="h5"><pre><font size="4">Dear All,</font><font size="4"><br><br><br>I am attempting to use Intel Visual Fortran 11.1 to add my own components to TRNSYS 16. <br>Any advice on resolving the following problem would be greatly appreciated.<br>



<br>As a fisrt step to building my own external dll, I followed the instructions in the Programmers Guide and rebuilt TRNDll using the project files located in <br>$Trnsys16\Compilers\Ivf81-Mvs2003. <br>It was necessary to remove Types 39, 90, 121 and precompiled Type 56 files from the build list to avoid fatal errors.<br>



<br>The compiled TRNDll.dll and TRNDll.lib were copied to the </font><font size="+0"><font size="4">$Trnsys16\Exe directory as instructed. <br><br>In TRNSYS Studio I then tested the rebuild by trying to execute example project Begin.tpf.<br>



<br>TRNSYS.exe crashed with the error: 'cannot find TRNDll.dll'<br><br>I then followed the suggested solution posted on trnsys-users, msg01245 and replaced the following libraries with those in my compiler:<br>libifcoremd.dll<br>



libifcoremmd.dll<br>libmmd.dll<br>libmmdd.dll<br><br>This enabled TRNSYS.exe to find TRNDll, but resulted in an Intel Fortran run-time error:<br>forrtl:sever 155: allocated array is already allocated<br></font></font><font size="+0"><font size="+0"><font size="+0"><font size="4">libifcoremd<br>



TRNDll.Dll<br>TRNEXE.exe<br>kernel32.dll<br>ntdll.dll<br><br>Thank you in advance for any suggestions of what to try next in resolving this issue.<br><br>Kind regards,<br>Leon Gaillard<br></font></font></font></font><br>


<br>
<font size="+0"><font size="4"><br><br></font></font><br></pre></div></div><hr noshade size="1"><pre>_______________________________________________
TRNSYS-users mailing list
<a>TRNSYS-users@cae.wisc.edu</a>
<a href="https://mailman.cae.wisc.edu/listinfo/trnsys-users" target="_blank">https://mailman.cae.wisc.edu/listinfo/trnsys-users</a>
</pre></div></td></tr></tbody></table></div></blockquote></div><br>