delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/12/02/06:14:03

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=4.3 required=5.0 tests=AWL,BAYES_20,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4CF77F6A.9040503@freenet.de>
Date: Thu, 02 Dec 2010 12:13:46 +0100
From: =?ISO-8859-15?Q?Klaus_Ramst=F6ck?= <klra67 AT freenet DOT de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Glut Problem
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019