[info-performer] convert n32 to 64-bit

New Message Reply Date view Thread view Subject view Author view

From: Stephen Jeffrey (Stephen.Jeffrey++at++maths.uq.edu.au)
Date: 07/01/2002 00:28:22


Hi,

I am trying to convert my code from n32 to 64-bit.
The -64 and -mips4 compiler options are specified
but my code behaves incorrectly. Does anyone know
what other compile options are needed, or do environment
variables have to be set?

An example of the strange behaviour is the following code:
----------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <GL/glx.h>
#include <X11/X.h>

int main(int argc, char *argv[])
{
   int no_found;
   XVisualInfo match, *visualList;
   Display *dpy;

   dpy = XOpenDisplay(NULL);
   if ( dpy == NULL ) {
      fprintf(stderr, "Could not open display\n");
      exit(1);
   }
   visualList = XGetVisualInfo(dpy, VisualScreenMask, &match,&no_found);
   fprintf(stderr, "No. of visuals: %d\n", no_found);

   return 0;
}
----------------------------------------------------------
If this is compiled to produce debug info:

CC test.cc -g -64 -o test -lX11

the output is incorrect. If it is compiled without "-g":

CC test.cc -64 -o test -lX11

the output is correct. I can avoid this simply by
not specifying "-g", but when some performer code
is added, problems still exist.

any ideas?

cheers
steve


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jul 01 2002 - 00:28:46 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.