Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GLEW: Apple Mach-O Linker (Id) Error

I'm trying to use glew in my Xcode project, but I'm getting this: Apple Mach-O Linker (Id) Error... Undefined symbols for architecture x86_64

I'm using the current version of glew that I downloaded from their sourceforge site.

Xcode error: Apple Mach-O Linker (Id) Error Undefined symbols for architecture x86_64

like image 838
brendanzab Avatar asked Jun 05 '26 19:06

brendanzab


2 Answers

Here's what I did:

Install Glew via MacPorts. (in terminal run the command sudo port install glew)

In the Xcode project's build settings add the following:

  • other linker flags: -lGLEW
  • header search paths: /opt/local/include/
  • library search paths: /opt/local/lib/
like image 172
brendanzab Avatar answered Jun 07 '26 09:06

brendanzab


You aren't linking with the GLEW library. You will probably have to add the directory, you installed GLES into, it to the 'library search path' settings of the Xcode project.

like image 35
trojanfoe Avatar answered Jun 07 '26 08:06

trojanfoe