<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Using DISLIN with SF in MacOS]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=780&amp;type=atom" />
	<updated>2020-10-06T11:38:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=780</id>
		<entry>
			<title type="html"><![CDATA[Using DISLIN with SF in MacOS]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3611#p3611" />
			<content type="html"><![CDATA[<p><span class="bbu"><strong>FULL INSTRUCTIONS FOR MacOS</strong></span> </p><p>If I find any errors, or anything to add, I&#039;ll try to remember to <br /><span class="bbu">keep this as a self-contained set of instructions</span>, by always repeating the FULL SET of instructions in any further posts, with the amendments included. </p><p>I invite anyone else to make corrections/improvements in the same way.</p><p><strong>Make the Simply Fortran version of gfortran etc <br />accessible as terminal commands</strong><br />&nbsp; &nbsp;Add this line to the $HOME/.profile file:<br />&nbsp; &nbsp; &nbsp; &nbsp;PATH=${PATH}:&quot;/Applications/Simply Fortran.app/Contents/MacOS/&quot;&nbsp; </p><p><strong>As explained in the Dislin README file</strong><br />&nbsp; &nbsp;Install OpenMotif in .Applications.<br />&nbsp; &nbsp;In Applications/OpenMotif21/lib, <br />&nbsp; &nbsp;create the symbolic link libXm.dylib to libXm.3.1.dylib: </p><div class="codebox"><pre><code>ln -s   /Applications/OpenMotif21/lib/libXm.3.1.dylib  /Applications/OpenMotif21/lib/libXm.dylib</code></pre></div><p>&nbsp; &nbsp;<br />&nbsp; &nbsp;Install Dislin in $HOME/{rest-of-your-chosen-pathname}/dislin,</p><p>&nbsp; &nbsp;Enter these instructions in the $HOME/.profile file:<br />&nbsp; &nbsp; &nbsp; &nbsp;DISLIN={dislin directory path]&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;export DISLIN<br />&nbsp; &nbsp; &nbsp; &nbsp;PATH=${PATH}:${DISLIN}/bin</p><p>&nbsp; &nbsp; &nbsp; &nbsp;DYLD_LIBRARY_PATH=$DISLIN:$DYLD_LIBRARY_PATH<br />&nbsp; &nbsp; &nbsp; &nbsp;export DYLD_LIBRARY_PATH</p><p><strong>Re-compile the applicable dislin.mod file <br />with SF’s current version of gfortran</strong> </p><div class="codebox"><pre><code>cd {pathname to}/dislin/gf/
   gfortran -c -o dislin.o dislin.f90</code></pre></div><p><strong>Use these settings in Simply Fortran project options</strong><br />&nbsp; &nbsp;General:<br />&nbsp; &nbsp; &nbsp; Target name:&nbsp; /Applications/{Program-name}.app<br />&nbsp; &nbsp;Code generation: <br />&nbsp; &nbsp; &nbsp; Target cpu: Generic<br />&nbsp; &nbsp; &nbsp; Memory model: Default(small)<br />&nbsp; &nbsp;Compiler flags:<br />&nbsp; &nbsp; &nbsp; Linker:&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; -L/Users/John/DEV/dislin&nbsp; -ldislin&nbsp; -L/Applications/OpenMotif21/lib&nbsp; -lXm<br />&nbsp; &nbsp;File locations : <br />&nbsp; &nbsp; &nbsp; Modules/Include files:&nbsp; {path to}dislin/gf<br />&nbsp; &nbsp; &nbsp; Libraries : {path to}/dislin<br />&nbsp; &nbsp; &nbsp; </p><p><strong>Additional step needed to resolve runtime errors</strong></p><p>&nbsp; &nbsp;With successfully compiled and linked executables<br />&nbsp; &nbsp;these runtime errors may occur:<br />&nbsp; &nbsp; <em>Dyld: Library not loaded: /usr/local/lib/libdislin.11.dylib.<br />&nbsp; &nbsp; Referenced from:&nbsp; /users/John/DEV/InStruct/Mac.SF/InStruct64</em><br />&nbsp; &nbsp;and/or<br />&nbsp; &nbsp; <em>Warning: Widget must be a VendorShell<br />&nbsp; &nbsp; &gt;&gt;&gt;&gt; Font cannot be loaded! (Helvetica&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br />&nbsp; &nbsp; Error: attempt to add non-widget child “dsm” to parent “dislin” which supports only widgets.</em></p><p>&nbsp; &nbsp;Solution:</p><p>&nbsp; &nbsp;<strong>In system folder, /usr/local/lib/, <br />&nbsp; &nbsp;create the symbolic link libdislin.11.dylib&nbsp; to&nbsp; libdislin.11.3.0.dylib</strong></p><div class="codebox"><pre><code>sudo ln -s {full path to dislin}/lib/libdislin.11.3.0.dylib  /usr/local/lib/libdislin.11.dylib</code></pre></div><p>&nbsp; &nbsp;<strong>Set the new link’s permissions to.&nbsp; rwx&nbsp; r-x&nbsp; r-x</strong></p><div class="codebox"><pre><code>sudo chmod 755 /usr/local/lib/libdislin.11.dylib</code></pre></div><p>&nbsp; &nbsp;There are two versions in system folders of the same dynamic library libXt.6.dylib :<br />&nbsp; &nbsp;(a)&nbsp; /opt/X11/lib/libXt.6.dylib&nbsp; &nbsp;(699 kB)<br />&nbsp; &nbsp;(b)&nbsp; /opt/X11/lib/flat_namespace/libXt.6.dylib&nbsp; &nbsp;(718 kB)</p><p>&nbsp; &nbsp;<strong>Made a backup copy of version (a), then make MacOS use version (b)</strong></p><div class="codebox"><pre><code>sudo mv /opt/X11/lib/libXt.6.dylib /opt/X11/lib/libXt.6.dylib.org
   sudo cp  /opt/X11/lib/flat_namespace/libXt.6.dylib  /opt/X11/lib/libXt.6.dylib</code></pre></div>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2020-10-06T11:38:46Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3611#p3611</id>
		</entry>
</feed>
