Reputation: 4700
Every now and then I want to compile something from source with mingw (on windows). I open msys, type ./configure, and it says
checking for...xxxxxx
There I have the first questions:
Occassionally there is an error like
configure: error: Package requirements <ogg >= 1.3> were not met:
No package 'ogg' found.
Well then I google and find "you can output the default lookup directories" so okay, I type gcc -print-search-dirs
and see a list of directories, for example C:/mingw/lib, C:/mingw/lib/gcc, ...
Those folders contain .a
-files. And guess what, some of them also contain libogg.a
. So why is it complaining? Perhaps the version number? No, I downloaded the newest source and compiled it, and put the .a file into the directories. Same error. It drives me crazy! Please give some advice what to do.
Upvotes: 2
Views: 622
Reputation: 61272
Traditionally and typically, when a ./configure
script checks for a library that the
package you are configuring needs to link against, it checks at least for the presence and usability of the library itself and also
for the header file(s) of the library, without which the compiler cannot use the
library's API. (I say typically, because what any given ./configure
check
actually does is programmed by the package maintainer. It has nothing to do with your compiler).
Checking for the presence and usability of libfoobar
normally does not mean that the ./configure
check searches the filesystem for libfoobar.dll
, libfoobar.a
, or whatever. It means that the ./configure
check simply attempts to compile and link a specimen program against libfoobar
using the commands that are appropriate for doing so, when libfoobar
is installed.
Often too (and increasingly), a ./configure
check for a library libfoobar
invokes the
pkg-config
tool to attempt to
retrieve the correct compiler and linker flags for use with libfoobar
. For this attempt to succeed, a pkg-config
meta-data
file associated with the library package, foobar.pc
, must be found in a standard
place in the filesystem, e.g. /usr/lib/pkgconfig
, /usr/share/pkgconfig
For the library, plus its headers, plus its pkg-config
meta-data (if any)
all to be available for ./configure
it is necessary to install the development package
of libfoobar
, as opposed to the basic package. The development package
usually has the same name as the basic package with the addition of a -dev
or -devel
component, e.g. libfoobar-dev
If a ./configure
check fails with an error of the form:
No package 'foobar' found.
it means that the check attempted to retrieve pkg-config
meta-data for
foobar
and none was found. That will usually be because the development
package libfoobar-dev
is not installed, even if libfoobar
is.
Upvotes: 1