<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Possible to generate symbol table?]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=843&amp;type=atom" />
	<updated>2022-02-18T02:00:12Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=843</id>
		<entry>
			<title type="html"><![CDATA[Re: Possible to generate symbol table?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3883#p3883" />
			<content type="html"><![CDATA[<p>I misunderstood your earlier post, and I thought you were saying that it worked.&nbsp; Regardless, I did make a mistake.&nbsp; It should be:</p><div class="codebox"><pre><code>-Wl,-Map=output.map</code></pre></div><p>Notice the equals sign in the flag, which is what I had missed.</p><p>A cleaner way to inspect the executable, though, might be to use the <strong>nm</strong> command from the command line.&nbsp; If Simply Fortran installed correctly, it should be on the path.&nbsp; You can use the command:</p><div class="codebox"><pre><code>nm myprog.exe &gt; output.lst</code></pre></div><p>and it should produce a more readable output.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2022-02-18T02:00:12Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3883#p3883</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Possible to generate symbol table?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3882#p3882" />
			<content type="html"><![CDATA[<p>So what iis the source of the error messages listed in my previous messages?</p>]]></content>
			<author>
				<name><![CDATA[Lewist57]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=4033</uri>
			</author>
			<updated>2022-02-17T23:36:16Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3882#p3882</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Possible to generate symbol table?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3881#p3881" />
			<content type="html"><![CDATA[<p>Yes, it was a lowercase &quot;L,&quot; not the number one.&nbsp; Sorry about that!</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2022-02-17T22:08:07Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3881#p3881</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Possible to generate symbol table?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3878#p3878" />
			<content type="html"><![CDATA[<p>Interesting, I noted that I did not follow your flag format exactly as typed, and when I did cut and paste the flags into the linker section, and rebuilt the project, got this output:</p><p>Generating target.exe<br />c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find : Invalid argument<br />c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find Map,output.map: No such file or directory<br />collect2.exe: error: ld returned 1 exit status<br />Error: Last command making (target.exe) returned a bad status<br />Error: Make execution terminated</p><p>* Failed *</p><p>Just to be sure, the first flag is Wl (lower case L) and not W1 (number 1)?<br />EDIT; does not like &quot;W1&quot; so it must be &quot;Wl&quot;</p><p>Thanks</p>]]></content>
			<author>
				<name><![CDATA[Lewist57]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=4033</uri>
			</author>
			<updated>2022-02-17T15:46:39Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3878#p3878</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Possible to generate symbol table?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3877#p3877" />
			<content type="html"><![CDATA[<p><em>output.map</em> is indeed a text file, and you can use whatever name you want.&nbsp; It should be, by default, in the same directory as your project file.&nbsp; It would be located in the working directory where the compiler was run, so, if you&#039;re working with a project, it would be in the project&#039;s directory.</p><p>If you&#039;re using the <em>Compile and Run Current File</em> option in the Build menu, then the output file will be buried somewhere in your temporary directory.&nbsp; I don&#039;t recommend trying to locate it in that case.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2022-02-16T22:11:50Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3877#p3877</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Possible to generate symbol table?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3876#p3876" />
			<content type="html"><![CDATA[<p>It accepted the linker flags with no issue. I assume that &quot;output.map&quot; is a text file with the symbol table (as well as other data), but could not find it in the folder associated with the project.&nbsp; Is it stored somewhere else?</p><p>Thanks.</p>]]></content>
			<author>
				<name><![CDATA[Lewist57]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=4033</uri>
			</author>
			<updated>2022-02-16T20:13:20Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3876#p3876</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Possible to generate symbol table?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3875#p3875" />
			<content type="html"><![CDATA[<p>The closest you&#039;ll get to what you&#039;re asking is a map file generated by the linker.&nbsp; On Windows and GNU/Linux, you can add the flags:</p><div class="codebox"><pre><code>-Wl,-Map,output.map</code></pre></div><p>and on macOS:</p><div class="codebox"><pre><code>-Wl,-map,output.map</code></pre></div><p>The resulting file will list <em>every</em> routine in the executable and its address within the executable.&nbsp; It might also list global/common variables, but it certainly would not list variables that exist only in the scope of a single procedure or module.&nbsp; The flags can be added to the &quot;Linker&quot; box under the <em>Compiler Flags</em> category in <a href="http://simplyfortran.com/docs/full/macos/options/project.html">Project Options</a>.</p><p>I italicized the word &quot;every&quot; because the map will also list every internal routine that the Fortran runtime library will call.&nbsp; It can be overwhelming to see all the routines listed.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2022-02-16T12:41:03Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3875#p3875</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Possible to generate symbol table?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3874#p3874" />
			<content type="html"><![CDATA[<p>Is there an option for either the compiler, debugger or any other tool to generate a symbol table that lists all variables/constants within a project?</p>]]></content>
			<author>
				<name><![CDATA[Lewist57]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=4033</uri>
			</author>
			<updated>2022-02-16T00:46:59Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3874#p3874</id>
		</entry>
</feed>
