Mail Archives: cygwin/2010/12/02/06:14:03
Dear list,
I tried to compile f90gl under a current cygwin. With some grey hair, I
succeded, but my programs dont start. I analysed the problem an can
reproduce it with this modified example glut program.
>From /usr/share/doc/opengl-1.1.0/GLUTexamples/helloGlut.c:
----cut
#include <stdio.h>
#include <GL/glut.h>
#include <GL/glutf90.h>
unsigned int i = 1;
void display_func(void)
{
if (i%2)
glClearColor(1., 0., 0., 1.); /* Red */
else
glClearColor(0., 0., 1., 1.); /* Blue */
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
void keyboard_func(unsigned char key, int x, int y)
{
if (key=='\033') /* ESC */
exit(0);
++i;
glutPostRedisplay();
}
void exit_func(void)
{
printf("Goodbye.\n");
}
#define GLUTCALLBACKFCB
typedef void (GLUTCALLBACKFCB *GLUTbuttonBoxFCBUSR) (int *, int *);
int main(int argc, char* argv[])
{
atexit(exit_func);
glutInit(&argc, argv);
glutCreateWindow("Hello GLUT!");
glutDisplayFunc(display_func);
glutKeyboardFunc(keyboard_func);
printf("Press any key to toggle color.\n");
printf("Press Esc to end.\n");
glutMainLoop();
int button, state;
((GLUTbuttonBoxFCBUSR)__glutGetFCB(GLUT_FCB_BUTTON_BOX))(&button, &state);
return 0;
}
----cut
The only relevant difference is this line:
((GLUTbuttonBoxFCBUSR)__glutGetFCB(GLUT_FCB_BUTTON_BOX))(&button, &state)
Without this line, the program compiles and works as expected.
It seems there is a mismatch between the definition of __glutGetFCB
in the .a and in the .dll file.
Can anybody confirm this and help me fix it?
Thank you.
Klaus
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -