<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Does SF look up system variables properly?]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=775</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=775&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Does SF look up system variables properly?.]]></description>
		<lastBuildDate>Tue, 29 Sep 2020 23:36:22 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Does SF look up system variables properly?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3602#p3602</link>
			<description><![CDATA[<p>Oh great - thanks Jeff.</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Tue, 29 Sep 2020 23:36:22 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3602#p3602</guid>
		</item>
		<item>
			<title><![CDATA[Re: Does SF look up system variables properly?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3601#p3601</link>
			<description><![CDATA[<p>Ah, I had forgotten that &quot;feature&quot; in Simply Fortran.&nbsp; For include and library directories, the development environment makes sure they exist before passing them to the make utility.&nbsp; But the development environment does not expand environment variables; that process happens in the make utility only.</p><p>I&#039;ll have to add environment variable expansion to the library and include directory detection in the development environment.&nbsp; It might take a few days.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 29 Sep 2020 23:32:27 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3601#p3601</guid>
		</item>
		<item>
			<title><![CDATA[Re: Does SF look up system variables properly?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3600#p3600</link>
			<description><![CDATA[<p>Jeff,</p><p>I really want to get this right, so I&#039;ve tried to do, to the letter, what you have explained, using system variables, but I just can&#039;t seem to get SF to do what I want !</p><p>To show my system variables, without &#039;typo&#039; errors, the following is copied and pasted from a CLI window:<br /></p><div class="codebox"><pre><code>➜  ~ echo $DISLIN
/Users/john/Library/dislin

➜  ~ echo $HOME
/Users/john</code></pre></div><p>These are my Options/File locations, which I typed here, in this forum posting, then copied and pasted into my SF settings (done that way roiund because I can&#039;t seem to &#039;copy&#039; from the SF settings dialog):<br /><span class="bbu">Modules</span>:<br />&nbsp; &nbsp; <strong>$(%DISLIN)/gf/Real64</strong><br />&nbsp; &nbsp; <strong>$(%HOME)/Documents/DEV/IOlibWin/Mac.SF/modules64</strong><br /><span class="bbu">Libraries</span>:<br />&nbsp; &nbsp; <strong>$(%DISLIN)</strong><br />&nbsp; &nbsp; <strong>$(%HOME)/Documents/DEV/IOlibWin/Mac.SF</strong></p><p>With the settings as above, </p><p>(1) Trying to BUILD gives this result:<br /></p><div class="codebox"><pre><code>Fatal Error: Cannot open module file &#039;dislin.mod&#039; for reading at (1): No such file or directory
compilation terminated.
Error: Last command making (./build64/Alloc.o) returned a bad status
Error: Make execution terminated
 
* Failed *</code></pre></div><p>..and (2) I get these errors in the Makefile:<br /></p><div class="codebox"><pre><code>IDIR=-I&quot;/Applications/Simply Fortran.app/Contents/Resources/gcc/include/&quot; -I/Users/john/Documents/DEV/INCLUDE 
# warning - directory error: $(%DISLIN)/gf/Real64
# warning - directory error: $(%HOME)/Documents/DEV/IOlibWin/Mac.SF/modules64

LDIR=-L&quot;/Applications/Simply Fortran.app/Contents/Resources/gcc/lib/&quot; 
# warning - directory error: $(%DISLIN)
# warning - directory error: $(%HOME)/Documents/DEV/IOlibWin/Mac.SF/modules64</code></pre></div><p>When I use these settings instead of the above, in my Options/File locations:<br /><span class="bbu">Modules</span>:<br />&nbsp; &nbsp; <strong>/Users/john/Library/dislin/gf/Real64</strong><br />&nbsp; &nbsp; <strong>/Users/john/Documents/DEV/IOlibWin/Mac.SF/modules64</strong><br /><span class="bbu">Libraries</span>:<br />&nbsp; &nbsp; <strong>/Users/john/Library/dislin</strong><br />&nbsp; &nbsp; <strong>/Users/john/Documents/DEV/IOlibWin/Mac.SF</strong></p><p>..these errors no longer appear.&nbsp; </p><p>(althought the build does still fail, but this time it fails because of coding errors, not because of being unable to find libraries.<br />--- <br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Tue, 29 Sep 2020 20:43:36 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3600#p3600</guid>
		</item>
		<item>
			<title><![CDATA[Re: Does SF look up system variables properly?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3599#p3599</link>
			<description><![CDATA[<p>John,</p><p>Yes, you can use that syntax in both locations.&nbsp; And no, the syntax isn&#039;t anywhere in the manual.&nbsp; I should add it.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 29 Sep 2020 13:03:25 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3599#p3599</guid>
		</item>
		<item>
			<title><![CDATA[Re: Does SF look up system variables properly?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3598#p3598</link>
			<description><![CDATA[<p>Many thanks Jeff.&nbsp; Is that in the &#039;Help&#039; manual?&nbsp; I&#039;m sorry if I missed it.<br />Also, ought I to be using the $(%name_of_env_var) syntax in Project options, not only in &gt;<span class="bbu">File locations</span> but also in &gt;<span class="bbu">Compiler flags</span>?<br />--- <br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Tue, 29 Sep 2020 12:31:23 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3598#p3598</guid>
		</item>
		<item>
			<title><![CDATA[Re: Does SF look up system variables properly?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3597#p3597</link>
			<description><![CDATA[<p>John,</p><p>Simply Fortran uses a modified version of Open Watcom Make to control the build process.&nbsp; The syntax for specifying environment variables is different than many UNIX utilities.&nbsp; To access an environment variable, you need to use:</p><div class="codebox"><pre><code>$(%name_of_env_var)</code></pre></div><p>so in your options string, you would want to use:</p><div class="codebox"><pre><code>-L$(%DISLIN)  -ldislin  -L/Applications/OpenMotif21/libs  -lXm </code></pre></div><p>and it should expand properly.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 29 Sep 2020 11:41:24 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3597#p3597</guid>
		</item>
		<item>
			<title><![CDATA[Does SF look up system variables properly?]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3596#p3596</link>
			<description><![CDATA[<p>SF MacOS version</p><p>When I use system variables that I have set to pathnames, such as $HOME, and $DISLIN, this seems not to work in all parts of Simply Fortran.</p><p>Although I&#039;m not yet certain of this, here&#039;s what appears initially to be the case:</p><p>SF DOES see look up the strings in these variables whem I enter them in Project options&gt;Compiler flags <br />eg&nbsp; &nbsp;-L$DISLIN&nbsp; -ldislin&nbsp; -L/Applications/OpenMotif21/libs&nbsp; -lXm </p><p>...but </p><p>it seems not to work when I enter them in Project options&gt;File locations.&nbsp; <br />eg $DISLIN, $DISLIN/gf/Real64, and $HOME/DEV/IoWinLib/Modules64<br />It works to expand these to the full pathnames but not when I use the $ system variables as above.</p><p>I discovered this by looking in the Makefile.&nbsp; When trying to &#039;build&#039; a project, I was getting errors about libraries not being found, so I examined the Makefile and was surprised to see error messages in there as well (surprised because I thought the Makefile was auto generated and then simply read, but it appears to receive error messages as well).&nbsp; Anyway, the Makefile showed me what was going wrong, which was helpful.&nbsp; I don&#039;t recall the exact error message but it was something about the pathnames it was trying to read, that contained system variables, not being found.</p><p>Is there something I am not doing correctly here?<br />Was it intended that SF should be able to look up system variables?<br />---<br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Tue, 29 Sep 2020 08:16:40 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3596#p3596</guid>
		</item>
	</channel>
</rss>
