Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

OpenGL examples fail when compiled as x64 (Intel Fortran 11.1.x)

strohhaecker
Beginner
1,217 Views

Hello,

compiling the OpenGL examples (under the Samples, respective Fortran/OpenGL directory) on a Windows7 64bit system works fine when targetting win32, but fails for x86.

This is both with the build.bat (started under an intel64 build environment shell) as well as a visual studio project switched to x64 (solution parameters are equal where possible). It happens with various of the latest 11.1 compiler versions including 11.1.51, and Visual Studio 2008 pro. The error message is "CreateWindow() failed" due to CreateWindowEx returning zero (GLUtilsMod.f90).

During the execution of CreateWindowEx, the WindowProc is called (all messages go unhandled by the procedure and use the DefWindowProc function).

Any help/information about this issue is appreciated.

0 Kudos
1 Solution
Steven_L_Intel1
Employee
1,217 Views
It seems I made, again, the mistake I wrote about here. I have attached a revised version of AnimateGL.f90 that fixes the problem. GLUtilsMod.f90 is ok.

The basic issue is that one should not use contained routines with uplevel references as Windows callbacks. Ever.

I'll fix all the OpenGL samples for the next release.

View solution in original post

0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,217 Views
Interesting - thanks, I'll take a look at that.
0 Kudos
strohhaecker
Beginner
1,217 Views
There's no change when using the later Intel Fortran versions, any update on this? Any idea what might go wrong? (parameter passing??)
0 Kudos
Steven_L_Intel1
Employee
1,217 Views
Sorry I dropped the ball on this. I think I know what is going wrong I'll get back to you.
0 Kudos
Steven_L_Intel1
Employee
1,218 Views
It seems I made, again, the mistake I wrote about here. I have attached a revised version of AnimateGL.f90 that fixes the problem. GLUtilsMod.f90 is ok.

The basic issue is that one should not use contained routines with uplevel references as Windows callbacks. Ever.

I'll fix all the OpenGL samples for the next release.
0 Kudos
strohhaecker
Beginner
1,217 Views
Seems to be working fine, thanks for looking into this!

0 Kudos
Reply