7

I'm trying to compile a demo project, what is using OpenGL.
I'm getting this error message: Everything is missing, at least gcc says it

But I have everything:

but I have everything

What is happening?
If I have all of the dependencies, why does it not compile?

I use Solus 3.

1 Answer 1

11

The meaning of -lglut32 (as an example) is, load the library glut32.

The result of the ls you execute showed that you have the header file for glut32

In order to solve the problem of cannot find -l-library-name

You need:

  1. To actually have the library in your computer
  2. Help gcc/the linker to find the library by providing the path to the library

    • You can add -Ldir-name to the gcc command
    • You can the library location to the LD_LIBRARY_PATH environment variable
  3. Update the "Dynamic Linker":

    sudo ldconfig
    

man gcc

-llibrary
-l library
    Search the library named library when linking. 
-Ldir
    Add directory dir to the list of directories to be searched for -l.
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .