<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Arial",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0065A3;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-language:EN-CA;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-US;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-CA link="#0065A3" vlink="#6E1C50"><div class=WordSection1><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'>From your settings, it seems that the project is linked against the DLL version of the compiler libraries <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas'>…<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas'><Tool Name="VFFortranCompilerTool" AdditionalOptions= … <b><span style='color:red'>RuntimeLibrary="rtMultiThreadedDebugDLL</span></b>" …<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas'>…<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'>You could try linking against the static version of those libs:<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas'>…<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas'><Tool Name="VFFortranCompilerTool" AdditionalOptions= … <b><span style='color:#00B050'>RuntimeLibrary="rtMultiThreadedDebug"</span></b> …<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas'>…<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'>(that is for the debug configuration, for the release configuration just delete RuntimeLibrary=”…” since the static version seems to be the default).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'>The equivalent setting is:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'>Project Properties > Fortran > Libraries > Runtime Library<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'>Choose “Multithreaded” for the Release configuration, and “Debug Multithreaded (/libs:static /threads /dbglibs)” for the Debug configuration.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'>With those settings, your Type DLL should not require the compiler DLLs at runtime. However, if you are using a precompiled form of the Lapack libraries that does require them, the problem will still be there, in which case I think David’s option (point your users to the compiler redistributables for the proper compiler version) is the best workaround. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>Michaël Kummert<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>Polytechnique Montréal<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-family:"Calibri",sans-serif;mso-fareast-language:EN-CA'>From:</span></b><span lang=EN-US style='font-family:"Calibri",sans-serif;mso-fareast-language:EN-CA'> TRNSYS-users <trnsys-users-bounces@lists.onebuilding.org> <b>On Behalf Of </b>David BRADLEY via TRNSYS-users<br><b>Sent:</b> August 12, 2020 10:42<br><b>To:</b> TRNSYS users mailing list at OneBuilding.org <trnsys-users@lists.onebuilding.org><br><b>Cc:</b> David BRADLEY <d.bradley@tess-inc.com>; Dani Carbonell Sanchez <dani.carbonell@ost.ch><br><b>Subject:</b> Re: [TRNSYS-users] compiling a Dll in release mode using external ibraries<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Some time ago, I had a similar situation with some different libraries. I think that the solution in my case was that I found something called the "microsoft redistributable libraries" that I had to include with my Type dll. It may be that LAPACK and BLAS have a similar requirement for distributable versions of their library.<span style='mso-fareast-language:EN-CA'><o:p></o:p></span></p><p>best,<o:p></o:p></p><p> David<o:p></o:p></p><p><o:p> </o:p></p><div><p class=MsoNormal>On 08/12/2020 01:08, Dani Carbonell Sanchez via TRNSYS-users wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-US>Dear TRNSYS team</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>We have developed a type that depends on external libraries LAPACK and BLAS.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>We compiled the dll using the Intel Visual Fortran Composer XE for Windows.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Attached you will find the settings used. </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>The problem with this dll is that any user need to install the Intel Visual Composer XE for Windows.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Is there a way to compile a dll that has all dependencies inside such that the user don't need </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>neither the compiler nor the external libraries?</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Thanks for your help.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Best regards,</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Dani</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Calibri",sans-serif;mso-fareast-language:EN-CA'><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>TRNSYS-users mailing list<o:p></o:p></pre><pre><a href="mailto:TRNSYS-users@lists.onebuilding.org">TRNSYS-users@lists.onebuilding.org</a><o:p></o:p></pre><pre><a href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</a><o:p></o:p></pre></blockquote><pre>-- <o:p></o:p></pre><pre>***************************<o:p></o:p></pre><pre>David BRADLEY<o:p></o:p></pre><pre>Principal<o:p></o:p></pre><pre>Thermal Energy Systems Specialists, LLC<o:p></o:p></pre><pre>3 North Pinckney Street - suite 202<o:p></o:p></pre><pre>Madison, WI  53703 USA<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>P:+1.608.274.2577<o:p></o:p></pre><pre>F:+1.608.278.1475<o:p></o:p></pre><pre><a href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre><a href="http://www.tess-inc.com">http://www.tess-inc.com</a><o:p></o:p></pre><pre><a href="http://www.trnsys.com">http://www.trnsys.com</a><o:p></o:p></pre></div></body></html>