<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Questions from a (SF-)beginner]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=284</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=284&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Questions from a (SF-)beginner.]]></description>
		<lastBuildDate>Fri, 06 Dec 2013 23:29:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1148#p1148</link>
			<description><![CDATA[<p>My linker options are:<br />-ldis -luser32 -lgdi32 -lopengl32</p><p>I add dislin.f90 to the project outline</p><p>I too came into F90/F95 etc from a long history of F77 code-writing.<br />F90 etc compiles F77 code without a problem.<br />One can just take advantage of any F90 features as and when discovering them and finding them useful.</p><p>I&#039;ve nearly finished a very large project in Simply Fortran using DISLIN for the Windows GUI, with tabulated input fields, on-screen buttons, and diagrams in one of the Window panes.<br />---<br />John.</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Fri, 06 Dec 2013 23:29:09 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1148#p1148</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1146#p1146</link>
			<description><![CDATA[<p>A few things are going wrong.&nbsp; First, don&#039;t add DISLIN&#039;s directory to the library or include search directories in Simply Fortran.&nbsp; It will lead to the second error you found: &quot;...because it was created by a different version of GNU Fortran.&quot;</p><p>Second, DISLIN has a number of dependencies on Windows, which is why I normally encourage using the SF Package Manager to handle DISLIN projects.&nbsp; You also need to link to a few Windows libraries.&nbsp; Specifically, add the following to your Linker Flags under Project Options:</p><div class="codebox"><pre><code>-luser32 -lgdi32 -lopengl32</code></pre></div><p>After that either the fixed- or free-format examples should compile.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 06 Dec 2013 21:25:17 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1146#p1146</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1143#p1143</link>
			<description><![CDATA[<p>Thanks for the explanations concerning mixed f77/f90 code, that&#039;s clear now.</p><p>Jeff seems to be right that DISLIN&#039;s setup does nothing more than copying files. When I went to get rid of the wrong distribution I first tried to do a regular Windows Uninstall, but DISLIN does not show up in the list of installed applications. So I simply removed the directory where I had stored the Cygwin distribution and &quot;installed&quot; the MinGW-W64 distribution.</p><p>I&#039;m still struggling to integrate DISLIN manually. This is what I tried:</p><p>DISLIN provides two example codes, &quot;exa&quot; and &quot;map&quot;, both in a f77 and a f90 version, </p><p>First I tried to get &quot;exa_f77&quot; to run </p><p>-&nbsp; set the environment variable &quot;DISLIN = D:\DISLIN_dl_10_mg&quot;&nbsp; (that&#039;s where the files reside)<br />&nbsp; &nbsp;and complemented the Windows PATH by &quot;D:\DISLIN_dl_10_mg\win&quot;&nbsp; (following DISLIN&#039;s instructions)</p><p>-&nbsp; created a new project &quot;exa_f77&quot;</p><p>-&nbsp; added the&nbsp; following files to this project<br />&nbsp; &nbsp; &nbsp;exa_f77.for<br />&nbsp; &nbsp; &nbsp;dislin.f90<br />&nbsp; &nbsp; &nbsp;dismg.a</p><p>-&nbsp; &nbsp;added&nbsp; &quot;D:\DISLIN_dl_10_mg&quot; to Search Directories/Library Directories</p><p>-&nbsp; Build Now! (after Save Project) produces the following errors:</p><p>Generating Makefile... Okay<br />==============================================================================<br />Open Watcom Make Version 1.9 (Built on Feb&nbsp; 4 2013)<br />Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.<br />Source code is available under the Sybase Open Watcom Public License.<br />See <a href="http://www.openwatcom.org/">http://www.openwatcom.org/</a> for details.<br />&nbsp; &nbsp; &quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe&quot; -o &quot;exa_f77.exe&quot; -static -mwindows &quot;build\dislin.o&quot; &quot;build\exa_f77.o&quot; &quot;D:\DISLIN_dl_10_mg\dismg.a&quot; -LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ -LD:/DISLIN_dl_10_mg<br />D:\DISLIN_dl_10_mg\dismg.a(qqwini.o):qqwini.c:(.text+0x2302): undefined reference to `__imp_glReadPixels&#039;<br />D:\DISLIN_dl_10_mg\dismg.a(qqwini.o):qqwini.c:(.text+0x230e): undefined reference to `__imp_glRasterPos2i&#039;<br />D:\DISLIN_dl_10_mg\dismg.a(qqwini.o):qqwini.c:(.text+0x231a): undefined reference to `__imp_glDrawPixels&#039;<br />...<br />&lt; many more similar messages &gt;<br />...<br />D:\DISLIN_dl_10_mg\dismg.a(qqwini.o):qqwini.c:(.text+0x1433e): undefined reference to `__imp_glClearColor&#039;<br />D:\DISLIN_dl_10_mg\dismg.a(qqwini.o):qqwini.c:(.text+0x14357): undefined reference to `__imp_glClearColor&#039;<br />D:\DISLIN_dl_10_mg\dismg.a(qqwini.o):qqwini.c:(.text+0x14362): undefined reference to `__imp_glClear&#039;<br />c:/program files (x86)/simply fortran 2/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\DISLIN_dl_10_mg\dismg.a(qqwini.o): bad reloc address 0x0 in section `.data&#039;<br />c:/program files (x86)/simply fortran 2/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operation<br />collect2.exe: error: ld returned 1 exit status<br />Error(E42): Last command making (exa_f77.exe) returned a bad status<br />Error(E02): Make execution terminated</p><p>* Failed *</p><p>-&nbsp; &nbsp;trying the example &quot;map_f90.f90&quot; in the same way produces this error:</p><p>Generating Makefile... Okay<br />==============================================================================<br />Open Watcom Make Version 1.9 (Built on Feb&nbsp; 4 2013)<br />Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.<br />Source code is available under the Sybase Open Watcom Public License.<br />See [URL removed due to post limitation] for details.<br />&nbsp; &nbsp; &quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe&quot; -c -o &quot;build\map_f90.o&quot; -g -ID:/FORTRAN-Applications/DISLIN_Examples/map_f90/../../../DISLIN_dl_10_mg/gf/real64&nbsp; -Jmodules &quot;..\..\..\DISLIN_dl_10_mg\examples\map_f90.f90&quot;<br />..\..\..\DISLIN_dl_10_mg\examples\map_f90.f90:9.10:</p><p>&nbsp; &nbsp; &nbsp; USE DISLIN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />Fatal Error: Cannot read module file &#039;dislin.mod&#039; opened at (1), because it was created by a different version of GNU Fortran<br />Error(E42): Last command making (build\map_f90.o) returned a bad status<br />Error(E02): Make execution terminated</p><p>* Failed *</p><br /> <br /><br /><p>What am I missing / doing wrong ?</p><p>Norbert</p>]]></description>
			<author><![CDATA[null@example.com (Norbert)]]></author>
			<pubDate>Fri, 06 Dec 2013 20:22:57 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1143#p1143</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1140#p1140</link>
			<description><![CDATA[<p>Norbert,</p><p>You can mix fixed-format and free-format source code in a single project without any problems.&nbsp; If you want to restrict your fixed-format code to the FORTRAN 77 standard, however, that really can&#039;t be achieved.&nbsp; That said, there really isn&#039;t much reason to enforce the FORTRAN 77 standard anyway unless your code is odd in some way; almost all FORTRAN 77 should compile just fine without forcing FORTRAN 77 compliance.</p><p>You shouldn&#039;t need to use dislin.f90 in your project if you don&#039;t plan on using Fortran 90 features.</p><p>The &quot;_d&quot; suffix in DISLIN designates that it is a double-precision library.&nbsp; Only ever include one or the other, never both files.</p><p>You shouldn&#039;t need to run DISLIN&#039;s setup.exe (I know I never have).&nbsp; I&#039;m not sure what it does other than copy files into a directory.&nbsp; </p><p>And David,</p><p>There is no single file compile option because it shouldn&#039;t be necessary.&nbsp; I&#039;m not saying it wouldn&#039;t serve a purpose, but, in general, it isn&#039;t overly useful.&nbsp; If you want to check syntax only, Simply Fortran&#039;s built-in syntax checks (also available via the Project Issues panel) should suffice.&nbsp; If you&#039;re seeing inconsistencies between the compiler output when you build and the reported errors and warnings on the Project Issues panel, let me know as that would be a bug.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 06 Dec 2013 18:55:01 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1140#p1140</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1138#p1138</link>
			<description><![CDATA[<div class="quotebox"><cite>jeff wrote:</cite><blockquote><p>Norbert,<br />Are you suggesting you just want to compile one file to an object file?&nbsp; If so, there is no way to do that in Simply Fortran.</p></blockquote></div><p>If you are working only with F77 source there won&#039;t be any file dependencies and a single file compile might make a lot of sense. One thing you can do is create a Console tool in the Toolbox, then go to the console and compile the old fashioned way using the command line </p><p>gfortran -c source.f</p><p>I don&#039;t think there is a way of specifying the current selected tab in the Toolbox; if there was you could create a compile tool.</p>]]></description>
			<author><![CDATA[null@example.com (davidb)]]></author>
			<pubDate>Fri, 06 Dec 2013 15:59:59 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1138#p1138</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1137#p1137</link>
			<description><![CDATA[<p>As far as I can see, there isn&#039;t a dislin_d.f90, only dislin.f90.</p><p>The dislin.f90 file allows you to put USE statements in your code so the compiler can check if you have the interface for each call correct.</p><p>You don&#039;t need this file in your project if you are writing F77 code, but then it will be your responsibility to get the interface correct.</p><p>You can add any F90 features you want to use to your F77 files. If your files are fixed formatted (column 1 for comment, 1-6 for label, 6 for continuation, 7-72 for code) you have to keep to this when you add new code. </p><p>You can mix F90 free format source code and F77 fixed format source code, but they need to be separate files. Use *.f90 for F90 source code and *.f for F77.</p><p>I have no idea why there is a&nbsp; dismg.a and dismg_d.a.</p>]]></description>
			<author><![CDATA[null@example.com (davidb)]]></author>
			<pubDate>Fri, 06 Dec 2013 15:47:30 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1137#p1137</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1135#p1135</link>
			<description><![CDATA[<p>David and Jeff,</p><p>thanks a lot for your quick replies (what time do you start working ? :-)</p><p>1. I agree. Just to check the syntax Build Now! is quick enough (at least with only a few sources in the project)</p><p>2. Great. This will be useful when you want to interrupt your work, knowing that you have made a lot of changes<br />&nbsp; &nbsp; in various sources which are&nbsp; not yet ready to be compiled.</p><p>3. I will try to follow your instructions with&nbsp; dl_10_mg.zip.</p><p>&nbsp; &nbsp; Is it enough to just unpack this archive to have access to the files or do I have to run their setup.exe ?</p><p>&nbsp; &nbsp; For the moment I will strictly stay with FORTRAN 77 (never made it to F90). Do I still need to include the<br />&nbsp; &nbsp; dislin.f90 or dislin_d.f90 files in my project - or would this cause a conflict with&nbsp; my f77 sources ?</p><p>&nbsp; &nbsp; What&#039;s the difference between&nbsp; dislin.f90 and dislin_d.f90 or dismg.a and dismg_d.a ?</p><p>&nbsp; &nbsp; &nbsp;General question: will a mixture of f77 and f90 sources work ?</p><p>Thanks,<br />Norbert</p>]]></description>
			<author><![CDATA[null@example.com (Norbert)]]></author>
			<pubDate>Fri, 06 Dec 2013 13:55:14 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1135#p1135</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1133#p1133</link>
			<description><![CDATA[<p>Norbert,</p><p>David did a good job answering your questions, but I&#039;ll try to add a few notes:</p><p>1. Are you suggesting you just want to compile one file to an object file?&nbsp; If so, there is no way to do that in Simply Fortran.&nbsp; However, I&#039;m not sure that&#039;s a particularly bad thing.&nbsp; If that&#039;s the only file that&#039;s changed, clicking &quot;Build Now!&quot; is about as costly as only compiling that one file.&nbsp; If you&#039;re asking if you can quickly compile one file to an executable without going through the process of creating a project, then, yes, that is possible.</p><p>2.&nbsp; A Save All feature would be great!&nbsp; Consider it implemented.</p><p>3.&nbsp; If you&#039;d like to manually use DISLIN yourself, you need to download <a href="ftp://ftp.gwdg.de/pub/grafik/dislin/win64/dl_10_mg.zip">dl_10_mg.zip</a>, which is the 64-bit distribution for MinGW-W64.&nbsp; You&#039;ve downloaded the Cygwin distribution, which will not work with Simply Fortran&#039;s compiler.&nbsp; Additionally, you&#039;ll need to include either <em>dislin.f90</em> or <em>dislin_d.f90</em> in your projects to construct the proper DISLIN modules (unless you&#039;re working strictly in FORTRAN 77).&nbsp; The DISLIN folks provide module files, but they won&#039;t be compatible with Simply Fortran&#039;s compiler.&nbsp; Their prebuilt <em>*.mod</em> files are for quite an old version of the Fortran compiler.&nbsp; Finally, make sure to link against <em>dismg.a</em> or <em>dismg_d.a</em> either by including it in your project or creating the proper linker flags.&nbsp; </p><p>The package manager sets up the above automatically, but it can be done manually without too much effort.</p><p>I hope the above answers your questions.&nbsp; If you have any more, please feel free to post them!</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 06 Dec 2013 12:42:55 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1133#p1133</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1132#p1132</link>
			<description><![CDATA[<p>1. I don&#039;t think so. With Fortran 90 onwards the dependencies between files make single file compiles less useful than in F77.<br />2. A Save All option of the file menu would be a good idea. Maybe this can be added for the next update.</p><p>I don&#039;t know much about DISLIN. Perhaps you could create a DISLIN library using SF, then add this library to the project that you want to use it in?</p><p>BTW I think you need the MingW version, dl_10_mg.zip</p><p>I will download it myself and have a go.</p>]]></description>
			<author><![CDATA[null@example.com (davidb)]]></author>
			<pubDate>Fri, 06 Dec 2013 10:46:09 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1132#p1132</guid>
		</item>
		<item>
			<title><![CDATA[Questions from a (SF-)beginner]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1131#p1131</link>
			<description><![CDATA[<p>After more than 30 years in aerodynamics, developing and using CFD tools, I retired recently and now want to reanimate some F77-codes which I had written and used originally under Linux. Looking for a &quot;low-cost&quot; Fortran development tool for Windows I found Simply Fortran - and to date, I really like it. </p><p>Now I have three questions (I am using version 2.6 Build 1470 under Windows 8):</p><p>1. (the simple one):<br />-------------------------<br />is there an option (in the editor) to &quot;just&quot; compile a single modified source code without clicking &quot;Build now!&quot; ?</p><p>2. (another simple one):<br />------------------------------<br />after having modified a number of source files from the project list, the editor panels indicate unsaved alterations by this little icon. If I now do a File/Exit I get the (very useful) warning that there are unsaved changes. First idea of course is to do Project/Save Project, but obviously that does not include a save on all source files. The tedious way is to activate each editor panel individually and do File/Save. I noticed that a &quot;Build Now! will also save all sources so that I can exit without warning. Is there something like an option &quot;Save All Sources&quot; or the possibility to select multiple source files from the project panel to which File/Save will apply ?</p><p>3. (the complex one):<br />---------------------------<br />I would like to enhance my codes with a GUI (which I never managed to do under Linux).&nbsp; After browsing a bit in your forum I came across DISLIN, which seems to be just right for my purpose, including the plotting capabilities. On the DISLIN homepage several versions are offered for download, I picked dl_10_gc.zip (64 bit), unpacked it, ran their setup.exe and set the environment variable DISLIN accordingly.</p><p>I did search the forum for DISLIN usage but find the information rather scattered. Is there a documentation about what has to be done further to be able to use DISLIN (not signing up to your package server to begin with) ?</p><p>Thanks,<br />Norbert</p>]]></description>
			<author><![CDATA[null@example.com (Norbert)]]></author>
			<pubDate>Fri, 06 Dec 2013 09:43:44 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1131#p1131</guid>
		</item>
	</channel>
</rss>
