LINUX.ORG.RU

Clanlib-0.6.5, Clanlib-0.7.8 и компиляция приложений их использующих!


0

0

У кого-нибудь получалось это сделать?
Clanlib-0.6.5
Всем приложения, в основном, которым нужна Clanlib требуют версию 0.6.5, которую у меня так и не получилось скомпилировать ни дома, ни на работе!
(Slackware10)
Дома она заваливается при компиляции clanGL, а на работе в самом начале на clanApp!

Clanlib-0.7.8
Скомпилировалась без проблем!
Но в отличие от предыдущей версии она юзает pkg-config!
В FAQ сказано:
How can I detect ClanLib from within a configure script?
How do I use pkg-config?

ClanLib-0.7 uses pkg-config to handle the issue of maintaining compiler and library flags needed for compilation. ClanLib-0.7 also installes its include files into ${prefix}/include/ClanLib-0.7/ClanLib/, so the normal way of just adding -lclanCore, etc. will not work. pkg-config simply outputs the compiler flags that are nedded for a given package, so usage is easy. To compile a simple test programm just do:

$ g++ yourprog.cpp -o yourprog `pkg-config --cflags --libs clanCore-0.7 clanDisplay-0.7 clanGL-0.7`

If you are using a configure script to configure the build process you can get the same thing done with the following macro:

REQUIRED_CLANLIB_VERSION="0.7.3"
PKG_CHECK_MODULES(YOURPROG, [
clanCore-0.7 > $REQUIRED_CLANLIB_VERSION
clanApp-0.7 > $REQUIRED_CLANLIB_VERSION
clanDisplay-0.7 > $REQUIRED_CLANLIB_VERSION
clanGL-0.7 > $REQUIRED_CLANLIB_VERSION
],
[])

AC_SUBST(YOURPROG_CFLAGS)
AC_SUBST(YOURPROG_LIBS)

Replace REQUIRED_CLANLIB_VERSION by whatever minor version is required for you program and YOURPROG with whatever is the name of your application. The result of this macro will be that YOURPROG_LIBS and YOURPROG_CFLAGS get set to the values returned by pkg-config. If you also use automake you have to add a line like:

yourprog_CPPFLAGS = @PINGUS_CFLAGS@

to your Makefile.am.

Т.е. я правильно понял, если сделать
CPPFLAGS=`pkg-config --cflags --libs clanCore-0.7 clanDisplay-0.7 clanGL-0.7` ./configure --with-extra-includes
Но configure не находит библиотеку!
У кого есть опыт, подскажите!

★★★★★
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.