Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

f90gl: trivial.f90 is not trivial

Gilles_R_
Beginner
1,270 Views

I am interested use f90gl.
Here I have downloaded f90gl v1.1.8 (last version is 1.1.12, but this version not contain compiled version)
Also, I would compile "trivial.f90" (an example of f90gl distribution)

I use IVF 9.1 and VS 2005.

I create a Visual StudioProject WinTrivial
I write a WinMain function:(I move body of "program trivial" into WinMain)

----------
integer*4 function WinMain( hInstance, hPrevInstance, lpszCmdLine, nCmdShow )
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WinMain@16' :: WinMain
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'WinMain' :: WinMain
!DEC$ ENDIF

use opengl_gl
use opengl_glut
use callbacks

implicit none

integer hInstance
integer hPrevInstance
integer lpszCmdLine
integer nCmdShow

real(kind=glfloat), parameter :: zero = 0.0_glfloat
real(kind=gldouble), parameter :: dzero = 0.0_gldouble, &
one = 1.0_gldouble
integer(kind=glcint) :: iwin
integer(kind=glenum) :: itemp

! Declare initial window size, position, and display mode
! (single buffer and RGBA). Open window with "trivial"
! in its title bar.
call glutinit()
call glutinitdisplaymode(ior(GLUT_SINGLE,GLUT_RGB))
iwin = glutcreatewindow("trivial")
! select clearing color
call glclearcolor(zero, zero, zero, zero)
! initialize viewing values
itemp = GL_PROJECTION
call glmatrixmode(itemp)
call glloadidentity()
call glortho(dzero, one, dzero, one, -one, one)
! Register callback function to display graphics.
! Enter main loop and process events.
call glutdisplayfunc(display)
call glutmainloop()

WinMain = 0

end
--------------------------

I add path for *.mod
and include glut32.lib, f90GL.lib, f90GLU.lib, f90GLUT.lib into solution

If I build solution, I get error:

1) Fatal eror cannot open "LIBC"
2) error: problem during multi-file optimization compilation (code 1)
3) error problem during multi-file optimization compilation (code 1)

If I search LIBC.* on disk - not found!

What is the problem? Do you have hints?

here full text of rebuil project:

------ Build started: Project: WinTrivial, Configuration: Debug|Win32 ------


Deleting intermediate files and output files for project 'WinTrivial', configuration 'Debug|Win32'.

Generating Fortran include file...

deftofd "C:At_workIVFV9SamplesOpenGLf90glf90gl-1.2.12examplesWinTrivialResource.h" "C:At_workIVFV9SamplesOpenGLf90glf90gl-1.2.12examplesWinTrivialResource.fd"

Compiling with Intel Fortran 9.1 C:Program FilesIntelCompilerFortran9.1IA32...

ifort /nologo /Zi /Od /include:"C:Program FilesIntelCompilerFortranf90gl" /module:"Debug/" / object:"Debug/" /traceback /check:bounds /libs:static /threads /dbglibs /winapp /c /Qvc8 /Qlocation,link,"C:Program FilesMicrosoft Visual Studio 8VCin" "C:At_workIVFV9SamplesOpenGLf90glf90gl-1.2.12examples rivial.f90"

ifort /nologo /Zi /Od /include:"C:Program FilesIntelCompilerFortranf90gl" /module:"Debug/" /object:"Debug/" /traceback /check:bounds /libs:static /threads /dbglibs /winapp /c /Qvc8 /Qlocation,link,"C:Program FilesMicrosoft Visual Studio 8VCin" "C:At_workIVFV9SamplesOpenGLf90glf90gl-1.2.12examplesWinTrivialWinTrivialglobals.f90"

ifort /nologo /Zi /Od /include:"C:Program FilesIntelCompilerFortranf90gl" /module:"Debug/" /object:"Debug/" /traceback /check:bounds /libs:static /threads /dbglibs /winapp /c /Qvc8 /Qlocation,link,"C:Program FilesMicrosoft Visual Studio 8VCin" "C:At_workIVFV9SamplesOpenGLf90glf90gl-1.2.12examplesWinTrivialWinTrivial.f90"

Linking...

Link /OUT:"Debug/WinTrivial.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:Program FilesIntelCompilerFortranf90gl" /MANIFEST /MANIFESTFILE:"C:At_workIVFV9SamplesOpenGLf90glf90gl-1.2.12examplesWinTrivialdebugwintrivial.exe.intermediate.manifest" /DEBUG /PDB:"Debug/WinTrivial.pdb" /SUBSYSTEM:WINDOWS "Debug/trivial.obj" "Debug/WinTrivialglobals.obj" "Debug/WinTrivial.obj" "C:Program FilesIntelCompilerFortranf90glf90GLU.lib" "C:Program FilesIntelCompilerFortranf90glglut32.lib" "C:Program FilesIntelCompilerFortranf90glf90GL.lib" "C:Program FilesIntelCompilerFortranf90glf90GLUT.lib"

Fatal error cannot open "LIBC"
Link: error: problem during multi-file optimization compilation (code 1)
Link: error: problem during multi-file optimization compilation (code 1)




WinTrivial build failed.


0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,270 Views
Oops. I need to rebuild f90GL so that it uses the multithread libraries, since libc.lib no longer exists in VS2005. I'll post when I have that.

By the way, 1.2.8 is the latest for Windows.
0 Kudos
Gilles_R_
Beginner
1,270 Views

ok. I am waiting your rebuild.Thanks Steve

Remark.
last news of f90gl specify
--------
Version 1.2.12 released on September 1, 2006

- add support for x86-64/Windows/Intel/OpenGL (thanks to Steve Lionel)
- bug fix for some 64-bit compilers; glcptr_length and size() were not glint
--------

Anyway, I have no problem use 1.2.8 ...

0 Kudos
Steven_L_Intel1
Employee
1,270 Views
I have updated the copy in this forum with 1.2.12 that should work fine with VS2005.
0 Kudos
Gilles_R_
Beginner
1,270 Views

Well. Well.
Now I compile, link and run my example.

I get only one warning:

Linking...
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

But this is not a problem.

Thanks Steve

0 Kudos
Steven_L_Intel1
Employee
1,270 Views
You'll get that if you're building in a Debug configuration - you can eliminate it by changing the project property Fortran..Libraries..Use Run-Time Library to "Multi-Threaded".
0 Kudos
Reply