Programming OpenGL/C++ with Eclipse CDT

Discussion in 'Mac Programming' started by Alexiel, Mar 7, 2009.

  1. macrumors newbie

    Joined:
    Mar 7, 2009
    #1
    Hello!

    It seems that I finally managed to download all those OpenGL frameworks, darwin ports packages, more packages for SDL, XCode and Eclipse can compile the most part of my project.

    Though... I'm stuck now at another error: "symbol(s) not found". I have a main.cpp and a int main() method inside, so that's not the error.

    Any ideas to solve this?

    Thanks in advance.
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Which symbol(s)? You most likely aren't linking against a certain framework/library, or don't even have it on your computer.
     
  3. thread starter macrumors newbie

    Joined:
    Mar 7, 2009
    #3
    Nice question... The only information Eclipse returns is:

    symbol(s) not found, on element: <Project Name>, location: line 0

    Am I missing some 'framework'? Currently mi list in /Library/Frameworks is:

    FxPlug.framework
    HPDeviceModel.framework
    HPPml.framework
    HPServicesInterface.framework
    HPSmartPrint.framework
    MacFUSE.framework
    PluginManager.framework
    ProFX.framework
    SDL.framework
    OpenGL.framework

    Do I need more or maybe I have to "link" them to the Eclipse? (In the last case I am totally newbie; I have never added/imported libraries nor plugins to Eclipse)

    Thanks.
     
  4. macrumors 6502

    Joined:
    Jun 23, 2003
    #4
    Your error message isn't very informative...however, you're definitely going to need to tell Eclipse where to find things. I've done some OpenGL-based programming on Eclipse on a Mac (though probably with a different graphics library than you), and the primary things you'll need to do are go to Properties->C/C++ Build->Settings, then select Miscellaneous under MacOS X C++ Linker and add to the Linker flags field the various Mac OS X frameworks you're using (in my case, I was using "-framework Carbon -framework OpenGL -framework SDL"). Other libraries, most likely including whatever graphics libraries you're using, go into Libraries (right above Miscellaneous).

    I can't really be of any more specific help without better information from you on what the problem is.
     
  5. thread starter macrumors newbie

    Joined:
    Mar 7, 2009
    #5
    Tried it, but no results...... I guess that Ganymede doesn't like me. Hah.

    Thanks for your help anyway .')
     

Share This Page