0

I'm using OpenGL with Xcode on my macbook Pro OS X 10.10 (Beta) and as soon as I tried to compile my project I ran into a problem.

#include <GLUT/glut.h> // OpenGL + GLUT
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <stdio.h>
#include <SDL/SDL.h>

int main(int argc, char *argv[])
{
    SDL_Init(SDL_INIT_VIDEO);
    SDL_WM_SetCaption("SDL GL Application", NULL);
    SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);
    glMatrixMode( GL_PROJECTION );
    glLoadIdentity( );
    gluPerspective(70,(double)640/480,1,1000);

    return 0;
}

I get a build succeed message and then :

dyld`dyld_fatal_error:
0x7fff5fc01074:  int3   
0x7fff5fc01075:  nop

I have no clue what it could mean and mostly how to solve it. The targeted platform is OS X 10.9.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Yvann Argentin
  • 83
  • 1
  • 1
  • 5
  • You need to provide more information for anyone to help you. What versions of Xcode and SDL are you using? What type of Xcode project did you create? Did you add the SDL framework to your project? Does the project crash when you run it or do you get a link error when you build it? The way you include SDL.h isn't going to work because SDL isn't a system framework. Use quotes, "SDL.h", instead of angle brackets. You don't need to include GLUT if you're using SDL. SDL provides a header file, SDL_opengl.h, for working with OpenGL so you don't have to include gl.h and glu.h. – Swift Dev Journal Oct 15 '14 at 19:14
  • Have you ever find a solution for this? – Hemang Jun 15 '15 at 11:01

0 Answers0