Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to include OpenGL + GLUT libraries in Eclipse in Mac OS X?
How to include OpenGL + GLUT libraries in Eclipse in Mac OS X? [message #1835276] Sun, 29 November 2020 19:04 Go to next message
Eclipse UserFriend
Using Mac OS X 11.0, Eclipse CDT 2020-9

I could use Xcode, but I simply like Eclipse better. I'm unsure how to exactly do it.
Re: How to include OpenGL + GLUT libraries in Eclipse in Mac OS X? [message #1835320 is a reply to message #1835276] Mon, 30 November 2020 15:54 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Generally,

  1. You need to tell the compiler where the include files can be found GCC -I (capital I) flag.
  2. You need to tell the linker where the libraries can be found and which to use GCC -L and -l (small L) flags
  3. If it is a dynamic library (*.so in Linux) you need to tell the operating system where it is when running
    LD_LIBRARY_PATH environment variable in Linux
  4. Tell the Indexer where the include files can be found
    Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros, etc
I've assumed you are using gcc/g++.
If you are using something else you should use comparable options.

How you do the first two depends on the build system being used.
If it is a Managed Build (i.e., Eclipse creates a Makefile), set the options using
Project --> Properties --> Settings --> Tool Settings tab

For any other build methods (CMake, e.g., or your own makefiles), you should refer to tutorials on using them.

If none of that makes any sense, you have a large learning curve to climb.
Eclipse assumes you already know how to use the external tools.

Find some tutorials online and also read:
https://tldp.org/HOWTO/Program-Library-HOWTO/index.html
https://www.gnu.org/software/make/manual/make.html
https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html



[Updated on: Mon, 30 November 2020 16:03]

Report message to a moderator

Re: How to include OpenGL + GLUT libraries in Eclipse in Mac OS X? [message #1835687 is a reply to message #1835320] Thu, 10 December 2020 12:22 Go to previous message
Mark Smith is currently offline Mark SmithFriend
Messages: 82
Registered: September 2020
Member
Please check this one
https://stackoverflow.com/questions/2068693/opengl-and-glut-in-eclipse-on-os-x
Previous Topic:No output from make with CMake
Next Topic:How to create a makefile in Assembly in Eclipse CDT, without C file?
Goto Forum:
  


Current Time: Thu Oct 03 17:25:15 GMT 2024

Powered by FUDForum. Page generated in 0.02847 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top