OpenGL/SDk Can not compile

Viewed 29

I am trying to run the make file of some application. The source code is

INCL= -I/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/GLUT.framework/Versions/A/Headers 
LIBD= -L/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries

evmovie: evmovie.c
    cc evmovie.c -o evmovie $(INCL) $(LIBD) -framework GLUT -lGL -lGLU 

When I run it in the terminal, it gives me a lot of warnings. The majority of them are saying a lot of glut function is deprecated since Mac OS 10.9. I just ignore them. However, one of the crucial errors is the following.

directory not found for option '-L/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries'

ld: library not found for -lGL

I do not not know how to fix this. Can anyone help me?

By the way, the source code of evmovie.c is

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <stdlib.h>

#if defined(WIN32) || defined(_WIN32)
#include <GLUT/glut.h>
#include <windows.h>
#include <io.h>

#else

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

#define __cdecl
#define _fileno fileno
int _filelength(int fd)
{ struct stat statbuf;
  fstat(fd,&statbuf);
  return statbuf.st_size;
}
#if defined(__APPLE__)

#include <GLUT/glut.h>
#else
// unix, linux
#include <GL/glut.h>
#endif

#endif

0 Answers
Related