<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Problem with Hello World using C++]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=159&amp;type=atom" />
	<updated>2013-02-26T20:26:59Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=159</id>
		<entry>
			<title type="html"><![CDATA[Re: Problem with Hello World using C++]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=592#p592" />
			<content type="html"><![CDATA[<p>Great to hear, Ronny!</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2013-02-26T20:26:59Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=592#p592</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with Hello World using C++]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=591#p591" />
			<content type="html"><![CDATA[<p>Thanks again Jeff! I removed the extra ones without looking what I had put there originally, so I can&#039;t tell you what was there before. But now everything is working as it should.</p><p>Again, thank you so much!<br />//Ronny</p>]]></content>
			<author>
				<name><![CDATA[videkull]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3412</uri>
			</author>
			<updated>2013-02-26T19:45:41Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=591#p591</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with Hello World using C++]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=590#p590" />
			<content type="html"><![CDATA[<p>Ronny,</p><p>I&#039;m wondering about the library paths you have set up.&nbsp; In project options, when you open Search Directories, try removing anything but the default directories.&nbsp; It appears that the compiler is searching the 64-bit libraries, but you&#039;re building a 32-bit executable.&nbsp; During the linking phase, the compiler is encountering libraries that appear to be named properly, but are actually for the 64-bit targets.&nbsp; Hence, you&#039;re seeing the compiler ignoring these 64-bit libraries.</p><p>When I compile and run your program, I&#039;m not seeing any such warnings.&nbsp; I think if you just remove those library search paths, you should be okay.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2013-02-26T19:29:22Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=590#p590</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with Hello World using C++]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=589#p589" />
			<content type="html"><![CDATA[<p>Thank you for the fast answer Jeff, it worked like a charm!</p><p>I am still getting the &quot;skipping incompatible&quot; things though. Is there anything I can do about that, or does that not affect me at all?<br />This is what the output looks like when I build:</p><p>Open Watcom Make Version 1.9 (Built on May 17 2012)<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\mingw-w64\bin\gcc.exe&quot; -c -o &quot;build\main.o&quot; -g -m32&nbsp; &nbsp;&quot;.\main.cpp&quot;<br />&nbsp; &nbsp; &quot;C:\Program Files (x86)\Simply Fortran\mingw-w64\bin\gfortran.exe&quot; -o &quot;hello.exe&quot; -static -m32 &quot;build\main.o&quot; -LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ -LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2 -lstdc++<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc_eh.a when searching for -lgcc_eh<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc.a when searching for -lgcc<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc_eh.a when searching for -lgcc_eh<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc.a when searching for -lgcc<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc_eh.a when searching for -lgcc_eh<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc.a when searching for -lgcc</p><p>* Complete *</p><p>//Ronny</p>]]></content>
			<author>
				<name><![CDATA[videkull]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3412</uri>
			</author>
			<updated>2013-02-26T19:04:00Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=589#p589</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with Hello World using C++]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=588#p588" />
			<content type="html"><![CDATA[<p>Ronny,</p><p>You&#039;ll just need to add the following to the Linker Flags in the Project Options dialog (accessible via the Options... item in the Project menu):<br /></p><div class="codebox"><pre><code>-lstdc++</code></pre></div><p>Your code should compile fine with that addition.</p><p>The flag is necessary because Simply Fortran is using the gfortran command for linking rather than g++, which would implicitly link the standard C++ library.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2013-02-26T18:09:05Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=588#p588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Problem with Hello World using C++]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=587#p587" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I just started using a trial version of Simply Fortran and tried to create a simple hello world program using c++. I have created a project and saved the file with the .cpp extension. The code is:</p><p>&quot;#include &lt;iostream&gt;</p><p>int main(int argc, char **argv) {<br />&nbsp; std::cout &lt;&lt; &quot;Hello world!\n&quot;;<br />&nbsp; return 0;<br />}&quot;</p><p>I get a bunch of error messages when compiling though:</p><p>Open Watcom Make Version 1.9 (Built on May 17 2012)<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\mingw-w64\bin\gcc.exe&quot; -c -o &quot;build\main.o&quot; -g -m32&nbsp; &nbsp;&quot;.\main.cpp&quot;<br />&nbsp; &nbsp; &quot;C:\Program Files (x86)\Simply Fortran\mingw-w64\bin\gfortran.exe&quot; -o &quot;hello.exe&quot; -static -m32 &quot;build\main.o&quot; -LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ -LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc_eh.a when searching for -lgcc_eh<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc.a when searching for -lgcc<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc_eh.a when searching for -lgcc_eh<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc.a when searching for -lgcc<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc_eh.a when searching for -lgcc_eh<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/gcc/X86_64~1/475CEE~1.2\libgcc.a when searching for -lgcc<br />build\main.o: In function `swscanf&#039;:<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/wchar.h:459: undefined reference to `__gxx_personality_sj0&#039;<br />build\main.o: In function `wscanf&#039;:<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/wchar.h:470: undefined reference to `__gxx_personality_sj0&#039;<br />build\main.o: In function `fwscanf&#039;:<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/wchar.h:481: undefined reference to `__gxx_personality_sj0&#039;<br />build\main.o: In function `fwprintf&#039;:<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/wchar.h:517: undefined reference to `__gxx_personality_sj0&#039;<br />build\main.o: In function `wprintf&#039;:<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/wchar.h:528: undefined reference to `__gxx_personality_sj0&#039;<br />build\main.o:c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/wchar.h:539: more undefined references to `__gxx_personality_sj0&#039; follow<br />build\main.o: In function `_tcf_0&#039;:<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/c++/4.7.2/iostream:75: undefined reference to `std::ios_base::Init::~Init()&#039;<br />build\main.o: In function `_static_initialization_and_destruction_0&#039;:<br />c:/program files (x86)/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/c++/4.7.2/iostream:75: undefined reference to `std::ios_base::Init::Init()&#039;<br />collect2.exe: error: ld returned 1 exit status<br />Error(E42): Last command making (hello.exe) returned a bad status<br />Error(E02): Make execution terminated</p><p>* Complete *</p><p>It seems like it is &quot;skipping incompatible&quot; for -lgcc. Does anyone know how I should fix that? </p><p>Regards<br />Ronny</p>]]></content>
			<author>
				<name><![CDATA[videkull]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3412</uri>
			</author>
			<updated>2013-02-26T17:16:25Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=587#p587</id>
		</entry>
</feed>
