<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Can't open module file: No such file or directory]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=710</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=710&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Can't open module file: No such file or directory.]]></description>
		<lastBuildDate>Fri, 08 Feb 2019 15:09:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Can't open module file: No such file or directory]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3292#p3292</link>
			<description><![CDATA[<p>I can&#039;t seem to replicate your issue.&nbsp; My &quot;Project B&quot; is picking up the <em>modA</em> module correctly. </p><p>Could you first confirm that <strong>modA.mod</strong> exists in &quot;Project A&#039;s&quot; module directory using Windows Explorer?</p><p>If it does seem to be there, could you email the project files (ending in .prj) to support@approximatrix.com?</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 08 Feb 2019 15:09:50 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3292#p3292</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't open module file: No such file or directory]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3290#p3290</link>
			<description><![CDATA[<p>Alright, will do! I made a pair of test projects just to demonstrate the issue. So I can post the source code of those projects if it would help.</p><br /><p>Project A</p><p>-&gt; Main Program<br /></p><div class="codebox"><pre><code>program mainA

use modA

implicit none
character (5) :: words
character (5) :: modout

words = &#039;help&#039;
call foo(words, modout)
write(*,&#039;(3a)&#039;) words,&#039; = &#039;,modout

words = &#039;why&#039;
call foo(words, modout)
write(*,&#039;(3a)&#039;) words,&#039; = &#039;,modout

words = modout
call foo(words, modout)
write(*,&#039;(3a)&#039;) words,&#039; = &#039;,modout

words = &#039;this&#039;
call foo(words, modout)
write(*,&#039;(3a)&#039;) words,&#039; = &#039;,modout

end program</code></pre></div><p>-&gt;ModA<br /></p><div class="codebox"><pre><code>module modA
implicit none
private
public :: foo

contains

subroutine foo(query, bar)
    character (5), intent (in) :: query
    character (5), intent (out):: bar
    
    select case (query)
        case (&#039;help&#039;) 
            bar = &#039;no&#039;
        case (&#039;why&#039;)
            bar = &#039;who&#039;
        case (&#039;who&#039;)
            bar = &#039;why&#039;
        case default
            bar = &#039;wuut?&#039;
    end select
end subroutine foo

end module modA</code></pre></div><p>ProjectB</p><p>-&gt; Main Program<br /></p><div class="codebox"><pre><code>program mainB

use modA

implicit none
character (5) :: words
character (5) :: modout

words = &#039;test&#039;
call foo(words, modout)
write(*,&#039;(3a)&#039;) words,&#039; = &#039;,modout

end program</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (jthomas)]]></author>
			<pubDate>Wed, 06 Feb 2019 14:03:06 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3290#p3290</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can't open module file: No such file or directory]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3289#p3289</link>
			<description><![CDATA[<p>I think you&#039;re using it as expected.&nbsp; I&#039;ll have to see if I can replicate the issue on my end.&nbsp; Could you let me know what version of Simply Fortran you&#039;re using and what operating system you&#039;re on?&nbsp; </p><p>After adding a search directory properly, it should be able to pick up modules from it.&nbsp; I&#039;m not sure why you&#039;re having the issue.</p><p>You could also try emailing the project files (just the .prj file, not any source code) and the makefiles for both projects to support@approximatrix.com.&nbsp; I can have a look to see what&#039;s occurring.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 06 Feb 2019 01:38:35 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3289#p3289</guid>
		</item>
		<item>
			<title><![CDATA[Can't open module file: No such file or directory]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3287#p3287</link>
			<description><![CDATA[<p>Hello Everybody,</p><p>This is almost certainly an &quot;inexperienced user&quot; problem, and the solution is probably very obvious, just not to me.</p><p>So, I&#039;ve created a module, compiled and tested said module (let&#039;s call it modA) in a project (let&#039;s call it projA). I&#039;m now working on another project (projB) in which I want to USE the module file. I have added the &quot;module&quot; and &quot;build&quot; directories of projA to the &quot;Include/Module Directories&quot; of projB (via Project Options &gt; File Locations &gt; Search Directories... &gt; Add...). Every time I go to build projB, I get a</p><p>Fatal Error: Can&#039;t open module file &#039;modA.mod&#039; for reading at (1): No such file or directory<br />compilation terminated.</p><br /><p>The result is the same if I:</p><p>1) Try to copy modA.mod to projB&#039;s &quot;Modules&quot; directory</p><p>2) Add modA.mod to the project (from it&#039;s original directory or projB&#039;s &quot;Modules&quot; folder)</p><p>3) Add modA.o to the project from its original directory</p><p>4) Add modA source to the project from its original directory</p><p>The code <strong>DOES</strong> compile if:</p><p>1) I copy modA&#039;s source code to projB&#039;s directory and add it to the project</p><p>2) I copy modA.mod to projB &quot;Modules&quot; dir, copy modA.o to projB &quot;Build&quot; dir, and add modA.o to projB</p><br /><p>Is this the intended way to use modules? I had thought that modules could be compiled, and than just referenced in situ in new projects.</p>]]></description>
			<author><![CDATA[null@example.com (jthomas)]]></author>
			<pubDate>Tue, 05 Feb 2019 19:05:06 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3287#p3287</guid>
		</item>
	</channel>
</rss>
