Linking error, cannot link with glew in xcode on Snow Leopard

Discussion in 'Mac Programming' started by aufgehaben, Mar 17, 2010.

  1. aufgehaben macrumors newbie

    Mar 17, 2010
    I get several linking errors when trying to build a project in xcode, after including glew.h and calling glewInit();.

    I've installed glew with macports, without complaint, the .h, .a and .dylib files exist in the correct places, the compiler finds glew.h, but the linker cannot find the library.

    libGLEW.a is added to the libraries in the project, it has the correct target set, -lGLEW is added to the linker flags, the paths to the libs are set as recursive, still it cannot find the library.

    Anybody got any tips or ideas?

    / Aufgehaben
  2. Alkiera macrumors regular

    Mar 11, 2008
    Have the error text? Is it possible it's not linking to GLEW that is issue, but GLEW trying to link to things it depends on?
  3. aufgehaben thread starter macrumors newbie

    Mar 17, 2010
    No, it actually seems like it cannot find the library.

    "_glewInit", referenced from:
    rp::FilmMDAS::initGPUResources(int, char**)in integrationmdas.o
    "___glewGenFramebuffersEXT", referenced from:
    ___glewGenFramebuffersEXT$non_lazy_ptr in integrationmdas.o
    ld: symbol(s) not found
    Still haven't solved it.

    / Aufgehaben

Share This Page