<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Problems compiling when using flibs and opengl]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=361&amp;type=atom" />
	<updated>2014-07-31T15:10:10Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=361</id>
		<entry>
			<title type="html"><![CDATA[Re: Problems compiling when using flibs and opengl]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1472#p1472" />
			<content type="html"><![CDATA[<p>Jeff,</p><p>I did indeed have the linker flags in the wrong order, flibs is now working perfectly, thanks again for your help.</p><p>Anthony</p>]]></content>
			<author>
				<name><![CDATA[anthonyg]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3566</uri>
			</author>
			<updated>2014-07-31T15:10:10Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1472#p1472</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problems compiling when using flibs and opengl]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1471#p1471" />
			<content type="html"><![CDATA[<p>Anthony,</p><p>I&#039;ve spent some time with flibs, and I was able to replicate your error.&nbsp; Checking the libraries, though, it was clear that the mentioned functions were indeed present.&nbsp; </p><p>The problem actually turned out to be the order of the library flags.&nbsp; &nbsp;I occasionally run into this linking issue&nbsp; when I&#039;m not careful with ordering library flags, and the default flags in the flibs-filedir project is a good example.&nbsp; If I change the linker flags to:</p><div class="codebox"><pre><code> -lflibs-filedir -lflibs-platform -lflibs-strings</code></pre></div><p>I don&#039;t seem to have any linking errors.&nbsp; Basically, the <em>m_vfile</em> module relies on functions/modules from both flibs-platform and&nbsp; flibs-strings.&nbsp; Therefore, the flags for these libraries have to come after the flag for flibs-filedir.&nbsp; The provided example, though, did not have this dependency.</p><p>Let us know if the above works!&nbsp; I&#039;ll correct the package as well.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-07-30T13:15:38Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1471#p1471</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problems compiling when using flibs and opengl]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1470#p1470" />
			<content type="html"><![CDATA[<p>Anthony,</p><p>The flibs filedir package should be working.&nbsp; Let me see if I can figure out why you&#039;re receiving the error.&nbsp; The flibs packages have rather odd ways of handling what types of strings they&#039;ll accept, so perhaps our build is not currently working properly.</p><p>There are, of course, other ways that would involve your wrapping C functions yourself that call the Windows API (or possibly the C runtime), but let me first check on whether flibs is working properly.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-07-29T17:42:30Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1470#p1470</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problems compiling when using flibs and opengl]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1469#p1469" />
			<content type="html"><![CDATA[<p>Jeff,</p><p>thanks very much for your help, opengl is working perfectly now. </p><p>I have checked the compiler flags in the linker box and all of the ones you listed for the flibs package are present, and it&#039;s still generating the errors listed earlier. Do you know of any other methods for reading directory contents (without using shell commands to create a text file)?</p><p>Anthony</p>]]></content>
			<author>
				<name><![CDATA[anthonyg]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3566</uri>
			</author>
			<updated>2014-07-29T13:44:34Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1469#p1469</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problems compiling when using flibs and opengl]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1468#p1468" />
			<content type="html"><![CDATA[<p>A&nbsp; new version of the <a href="http://packages.simplyfortran.com/package/37.html">F03GL package</a> is now available that fixes linking issues with 32-bit programs.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-07-28T18:23:00Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1468#p1468</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problems compiling when using flibs and opengl]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1467#p1467" />
			<content type="html"><![CDATA[<p>A followup on the F03GL package:</p><p>It appears that something surrounding linking in the F03GL package is not working properly since moving to GNU Fortran 4.9.0 in <em>32-bit mode only</em>.&nbsp; The F03GL&#039;s example will compile if you change the project to a 64-bit executable in Project Options.</p><p>The 32-bit example fails during linking due to an issue with the calling convention.&nbsp; For some reason, the compiler and linker can&#039;t find and/or link properly with the system OpenGL libraries.&nbsp; I&#039;ll have&nbsp; a solution shortly.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-07-28T14:34:53Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1467#p1467</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problems compiling when using flibs and opengl]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1466#p1466" />
			<content type="html"><![CDATA[<p>Anthony,</p><p>When you&#039;re trying to use the flibs filedir package, are you sure to include the proper compiler flags as well?&nbsp; In Project Options under Compiler Flags, you should have the following in the box labeled Linker:</p><div class="codebox"><pre><code>-lflibs-strings -lflibs=platform -lflibs-filedir</code></pre></div><p>The above libraries are necessary to link against the flibs libraries.&nbsp; If you do have the appropriate flags, there may be something wrong with the packages themselves.</p><p>In the OpenGL example, it seems there may be something wrong with the package flags themselves.&nbsp; I&#039;m looking into it now.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-07-28T11:50:43Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1466#p1466</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Problems compiling when using flibs and opengl]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1465#p1465" />
			<content type="html"><![CDATA[<p>I am trying to use the m_vfile module in flibs to construct a file manager, however when I call functions in that module I get the following errors:</p><br /><p>C:/Users/AnthonyG/AppData/Local///sfpm/32/lib\libflibs-filedir.a(m_vfile.o): In function `_m_vfile_MOD_vfile_shutdown&#039;:<br />C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3702: undefined reference to `__m_vstring_MOD_vstring_free&#039;<br />C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3703: undefined reference to `__m_vstring_MOD_vstring_free&#039;<br />C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3704: undefined reference to `__m_vstring_MOD_vstring_free&#039;<br />C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3705: undefined reference to `__m_vstring_MOD_vstring_free&#039;<br />C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3706: undefined reference to `__m_vstring_MOD_vstring_free&#039;<br />C:/Users/AnthonyG/AppData/Local///sfpm/32/lib\libflibs-filedir.a(m_vfile.o):C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3707: more undefined references to `__m_vstring_MOD_vstring_free&#039; follow<br />C:/Users/AnthonyG/AppData/Local///sfpm/32/lib\libflibs-filedir.a(m_vfile.o): In function `_m_vfile_MOD_vfile_startup&#039;:<br />C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3631: undefined reference to `__m_platform_MOD_platform_get_platform&#039;<br />C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3632: undefined reference to `__m_vstringformat_MOD_vstring_format_auto_integer_kind4&#039;<br />C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3645: undefined reference to `__m_vstring_MOD_vstring_new_empty&#039;<br />...<br />...<br />(many more of the same error messages)<br />...<br />...</p><p>collect2.exe: error: ld returned 1 exit status<br />Error(E42): Last command making (RAS.exe) returned a bad status<br />Error(E02): Make execution terminated</p><p>* Failed *</p><br /><p>The included flibs demo file test_m_filedir.f90 compiles and executes fine (although it doesn&#039;t use m_vfile), however the demo file myfprog.f90 for sqlite generates the same errors as above. I also have similar problems compiling the opengl demo:</p><br /><p>Warning: resolving _glMatrixMode by linking to _glMatrixMode@4<br />Use --enable-stdcall-fixup to disable these warnings<br />Use --disable-stdcall-fixup to disable these fixups<br />Warning: resolving _glLoadIdentity by linking to _glLoadIdentity@0<br />Warning: resolving _glTranslatef by linking to _glTranslatef@12<br />Warning: resolving _glDisable by linking to _glDisable@4<br />Warning: resolving _glPushMatrix by linking to _glPushMatrix@0<br />Warning: resolving _glPopMatrix by linking to _glPopMatrix@0<br />Warning: resolving _glFlush by linking to _glFlush@0<br />Warning: resolving _glBegin by linking to _glBegin@4<br />Warning: resolving _glEnd by linking to _glEnd@0<br />Warning: resolving _glColor4fv by linking to _glColor4fv@4<br />build\scube.o: In function `MAIN__&#039;:<br />C:\Users\AnthonyG\Documents/./scube.f90:59: undefined reference to `glFrustum&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:65: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:68: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:70: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:71: undefined reference to `glLightfv&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:72: undefined reference to `glLightfv&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:73: undefined reference to `glLightfv&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:74: undefined reference to `glLightfv&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:80: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:83: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:85: undefined reference to `glFogfv&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:86: undefined reference to `glFogfv&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:88: undefined reference to `glFogf&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:89: undefined reference to `glFogf&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:90: undefined reference to `glFogf&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:91: undefined reference to `glFogf&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:93: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:94: undefined reference to `glCullFace&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:96: undefined reference to `glShadeModel&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:98: undefined reference to `glBlendFunc&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:100: undefined reference to `glPolygonStipple&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:102: undefined reference to `glPolygonStipple&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:105: undefined reference to `glClearColor&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:106: undefined reference to `glClearIndex&#039;<br />C:\Users\AnthonyG\Documents/./scube.f90:107: undefined reference to `glClearDepth&#039;<br />build\scube_mod.o: In function `menu_select&#039;:<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:465: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:473: undefined reference to `glEnable&#039;<br />build\scube_mod.o: In function `fog_select&#039;:<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:447: undefined reference to `glFogf&#039;<br />build\scube_mod.o: In function `display&#039;:<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:371: undefined reference to `glClear&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:375: undefined reference to `glRotatef&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:376: undefined reference to `glScalef&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:383: undefined reference to `glScalef&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:390: undefined reference to `glScalef&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:391: undefined reference to `glRotatef&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:392: undefined reference to `glRotatef&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:393: undefined reference to `glRotatef&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:394: undefined reference to `glScalef&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:395: undefined reference to `glGetFloatv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:400: undefined reference to `glDepthMask&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:402: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:404: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:412: undefined reference to `glMultMatrixf&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:420: undefined reference to `glMultMatrixf&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:425: undefined reference to `glDepthMask&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:432: undefined reference to `glEnable&#039;<br />build\scube_mod.o: In function `keyboard&#039;:<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:333: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:341: undefined reference to `glEnable&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:348: undefined reference to `glFogf&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:352: undefined reference to `glFogf&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:356: undefined reference to `glFogf&#039;<br />build\scube_mod.o: In function `_scube_mod_MOD_myshadowmatrix&#039;:<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:306: undefined reference to `glMultMatrixf&#039;<br />build\scube_mod.o: In function `_scube_mod_MOD_drawcheck&#039;:<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:245: undefined reference to `glGenLists&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:247: undefined reference to `glNewList&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:250: undefined reference to `glNormal3fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:269: undefined reference to `glVertex4fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:270: undefined reference to `glVertex4fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:271: undefined reference to `glVertex4fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:272: undefined reference to `glVertex4fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:282: undefined reference to `glEndList&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:287: undefined reference to `glCallList&#039;<br />build\scube_mod.o: In function `_scube_mod_MOD_drawcube&#039;:<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:221: undefined reference to `glNormal3fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:223: undefined reference to `glVertex4fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:224: undefined reference to `glVertex4fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:225: undefined reference to `glVertex4fv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:226: undefined reference to `glVertex4fv&#039;<br />build\scube_mod.o: In function `_scube_mod_MOD_setcolor&#039;:<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:157: undefined reference to `glMaterialfv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:160: undefined reference to `glMaterialfv&#039;<br />C:\Users\AnthonyG\Documents/./scube_mod.f90:166: undefined reference to `glIndexf&#039;<br />collect2.exe: error: ld returned 1 exit status<br />Error(E42): Last command making (scube.exe) returned a bad status<br />Error(E02): Make execution terminated</p><p>* Failed *</p><p>If anybody has any ideas I could try I would appreciate it. Thanks in advance.</p><p>Anthony</p>]]></content>
			<author>
				<name><![CDATA[anthonyg]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3566</uri>
			</author>
			<updated>2014-07-27T17:26:16Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1465#p1465</id>
		</entry>
</feed>
