Topic: Problems compiling when using flibs and opengl
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:
C:/Users/AnthonyG/AppData/Local///sfpm/32/lib\libflibs-filedir.a(m_vfile.o): In function `_m_vfile_MOD_vfile_shutdown':
C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3702: undefined reference to `__m_vstring_MOD_vstring_free'
C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3703: undefined reference to `__m_vstring_MOD_vstring_free'
C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3704: undefined reference to `__m_vstring_MOD_vstring_free'
C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3705: undefined reference to `__m_vstring_MOD_vstring_free'
C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3706: undefined reference to `__m_vstring_MOD_vstring_free'
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' follow
C:/Users/AnthonyG/AppData/Local///sfpm/32/lib\libflibs-filedir.a(m_vfile.o): In function `_m_vfile_MOD_vfile_startup':
C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3631: undefined reference to `__m_platform_MOD_platform_get_platform'
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'
C:\Users\Jeffrey\Workspace\sfpm\packages\flibs\projects/../src/filedir/m_vfile.f90:3645: undefined reference to `__m_vstring_MOD_vstring_new_empty'
...
...
(many more of the same error messages)
...
...
collect2.exe: error: ld returned 1 exit status
Error(E42): Last command making (RAS.exe) returned a bad status
Error(E02): Make execution terminated
* Failed *
The included flibs demo file test_m_filedir.f90 compiles and executes fine (although it doesn'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:
Warning: resolving _glMatrixMode by linking to _glMatrixMode@4
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
Warning: resolving _glLoadIdentity by linking to _glLoadIdentity@0
Warning: resolving _glTranslatef by linking to _glTranslatef@12
Warning: resolving _glDisable by linking to _glDisable@4
Warning: resolving _glPushMatrix by linking to _glPushMatrix@0
Warning: resolving _glPopMatrix by linking to _glPopMatrix@0
Warning: resolving _glFlush by linking to _glFlush@0
Warning: resolving _glBegin by linking to _glBegin@4
Warning: resolving _glEnd by linking to _glEnd@0
Warning: resolving _glColor4fv by linking to _glColor4fv@4
build\scube.o: In function `MAIN__':
C:\Users\AnthonyG\Documents/./scube.f90:59: undefined reference to `glFrustum'
C:\Users\AnthonyG\Documents/./scube.f90:65: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube.f90:68: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube.f90:70: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube.f90:71: undefined reference to `glLightfv'
C:\Users\AnthonyG\Documents/./scube.f90:72: undefined reference to `glLightfv'
C:\Users\AnthonyG\Documents/./scube.f90:73: undefined reference to `glLightfv'
C:\Users\AnthonyG\Documents/./scube.f90:74: undefined reference to `glLightfv'
C:\Users\AnthonyG\Documents/./scube.f90:80: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube.f90:83: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube.f90:85: undefined reference to `glFogfv'
C:\Users\AnthonyG\Documents/./scube.f90:86: undefined reference to `glFogfv'
C:\Users\AnthonyG\Documents/./scube.f90:88: undefined reference to `glFogf'
C:\Users\AnthonyG\Documents/./scube.f90:89: undefined reference to `glFogf'
C:\Users\AnthonyG\Documents/./scube.f90:90: undefined reference to `glFogf'
C:\Users\AnthonyG\Documents/./scube.f90:91: undefined reference to `glFogf'
C:\Users\AnthonyG\Documents/./scube.f90:93: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube.f90:94: undefined reference to `glCullFace'
C:\Users\AnthonyG\Documents/./scube.f90:96: undefined reference to `glShadeModel'
C:\Users\AnthonyG\Documents/./scube.f90:98: undefined reference to `glBlendFunc'
C:\Users\AnthonyG\Documents/./scube.f90:100: undefined reference to `glPolygonStipple'
C:\Users\AnthonyG\Documents/./scube.f90:102: undefined reference to `glPolygonStipple'
C:\Users\AnthonyG\Documents/./scube.f90:105: undefined reference to `glClearColor'
C:\Users\AnthonyG\Documents/./scube.f90:106: undefined reference to `glClearIndex'
C:\Users\AnthonyG\Documents/./scube.f90:107: undefined reference to `glClearDepth'
build\scube_mod.o: In function `menu_select':
C:\Users\AnthonyG\Documents/./scube_mod.f90:465: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube_mod.f90:473: undefined reference to `glEnable'
build\scube_mod.o: In function `fog_select':
C:\Users\AnthonyG\Documents/./scube_mod.f90:447: undefined reference to `glFogf'
build\scube_mod.o: In function `display':
C:\Users\AnthonyG\Documents/./scube_mod.f90:371: undefined reference to `glClear'
C:\Users\AnthonyG\Documents/./scube_mod.f90:375: undefined reference to `glRotatef'
C:\Users\AnthonyG\Documents/./scube_mod.f90:376: undefined reference to `glScalef'
C:\Users\AnthonyG\Documents/./scube_mod.f90:383: undefined reference to `glScalef'
C:\Users\AnthonyG\Documents/./scube_mod.f90:390: undefined reference to `glScalef'
C:\Users\AnthonyG\Documents/./scube_mod.f90:391: undefined reference to `glRotatef'
C:\Users\AnthonyG\Documents/./scube_mod.f90:392: undefined reference to `glRotatef'
C:\Users\AnthonyG\Documents/./scube_mod.f90:393: undefined reference to `glRotatef'
C:\Users\AnthonyG\Documents/./scube_mod.f90:394: undefined reference to `glScalef'
C:\Users\AnthonyG\Documents/./scube_mod.f90:395: undefined reference to `glGetFloatv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:400: undefined reference to `glDepthMask'
C:\Users\AnthonyG\Documents/./scube_mod.f90:402: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube_mod.f90:404: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube_mod.f90:412: undefined reference to `glMultMatrixf'
C:\Users\AnthonyG\Documents/./scube_mod.f90:420: undefined reference to `glMultMatrixf'
C:\Users\AnthonyG\Documents/./scube_mod.f90:425: undefined reference to `glDepthMask'
C:\Users\AnthonyG\Documents/./scube_mod.f90:432: undefined reference to `glEnable'
build\scube_mod.o: In function `keyboard':
C:\Users\AnthonyG\Documents/./scube_mod.f90:333: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube_mod.f90:341: undefined reference to `glEnable'
C:\Users\AnthonyG\Documents/./scube_mod.f90:348: undefined reference to `glFogf'
C:\Users\AnthonyG\Documents/./scube_mod.f90:352: undefined reference to `glFogf'
C:\Users\AnthonyG\Documents/./scube_mod.f90:356: undefined reference to `glFogf'
build\scube_mod.o: In function `_scube_mod_MOD_myshadowmatrix':
C:\Users\AnthonyG\Documents/./scube_mod.f90:306: undefined reference to `glMultMatrixf'
build\scube_mod.o: In function `_scube_mod_MOD_drawcheck':
C:\Users\AnthonyG\Documents/./scube_mod.f90:245: undefined reference to `glGenLists'
C:\Users\AnthonyG\Documents/./scube_mod.f90:247: undefined reference to `glNewList'
C:\Users\AnthonyG\Documents/./scube_mod.f90:250: undefined reference to `glNormal3fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:269: undefined reference to `glVertex4fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:270: undefined reference to `glVertex4fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:271: undefined reference to `glVertex4fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:272: undefined reference to `glVertex4fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:282: undefined reference to `glEndList'
C:\Users\AnthonyG\Documents/./scube_mod.f90:287: undefined reference to `glCallList'
build\scube_mod.o: In function `_scube_mod_MOD_drawcube':
C:\Users\AnthonyG\Documents/./scube_mod.f90:221: undefined reference to `glNormal3fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:223: undefined reference to `glVertex4fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:224: undefined reference to `glVertex4fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:225: undefined reference to `glVertex4fv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:226: undefined reference to `glVertex4fv'
build\scube_mod.o: In function `_scube_mod_MOD_setcolor':
C:\Users\AnthonyG\Documents/./scube_mod.f90:157: undefined reference to `glMaterialfv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:160: undefined reference to `glMaterialfv'
C:\Users\AnthonyG\Documents/./scube_mod.f90:166: undefined reference to `glIndexf'
collect2.exe: error: ld returned 1 exit status
Error(E42): Last command making (scube.exe) returned a bad status
Error(E02): Make execution terminated
* Failed *
If anybody has any ideas I could try I would appreciate it. Thanks in advance.
Anthony