Skip to main content



      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 14: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 10:54 Go to previous messageGo to next message
Eclipse UserFriend
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 11:03] by 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 07:22 Go to previous message
Eclipse UserFriend
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: Tue Jun 17 04:30:59 EDT 2025

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

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

Back to the top