0

I'm trying to install 'quadrupel', a library that relies on ffmpeg on Solaris x86.

I managed to build ffmpeg and its libraries live in /opt/gnu/lib and the includes are in /opt/gnu/include but when I try to build quadrupel, it can't find the ffmpeg headers.

What flags/configuration is required to include those two directories in the proper search paths for libraries and includes? I'm not much of a Makefile hacker.

2 Answers 2

5

I believe you need to add the following to the Makefile:

CFLAGS  += -I/opt/gnu/include
LDFLAGS += -L/opt/gnu/lib -R/opt/gnu/lib

The -I argument tell gcc where to find the include files. The -L flag tells ld where to find the libraries while linking. The -R flag writes /opt/gnu/lib into the library search path in the quadrupel binary, so it can find its libraries when it starts.

1

You can override the path by setting the environmental variable LD_LIBRARY_PATH. However I would suggest changing the system paths as well so you don't have to change the library path for all users. This can be done using crel.

crle -l -c /var/ld/ld.config -l /usr/lib:/usr/local/lib:/opt/gnu/lib

For the includes just add -I/opt/gnu/include to your CFLAGS variable.

1
  • 1
    That should be crle (configure runtime linking environment) Jan 5, 2009 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.