[Clam-devel] Newbie question
David García Garzón
dgarcia at iua.upf.edu
Fri Dec 5 08:36:12 PST 2008
On Friday 05 December 2008 14:54:01 Stephane THOMAS wrote:
> Hi,
>
> This is my first post on this list, I hope I'm in a right place even if my
> question sounds more like I need help...
Normally 'users' list is more suited to this kind of questions and this list
is more oriented on the development of the framework itself. But don't worry,
it is ok. Moreover, as you are steping the unexplored country of using qmake
to compile CLAM feel welcome in that list :-)
> My goal : I wan't to develop an audio app (a looper) using QT4 and CLAM.
> I'm new to QT4 too but I've already made some little programs and I now
> have the basics of QT.
>
> Currently I want to make a simple program that mix GUI stuff and CLAM libs,
> I (with not much imagination) choose to develop an audio reader (load a
> file, play, stop, quit) something very simple.
If you didn't, just take a look at the FilePlayer.clamnetwork example and its
buddy FilePlayer.ui.
> I obtained and built CLAM, NetworkEditor and Prototyper (those last two
> works quite fine) from the svn. (rev 12419)
>
> I would be able to build my application using qmake (without scons) is it
> possible ? How ?
It should be possible to use qmake, but i don't know how difficult it would
be. I guess it is simple as CLAM provides pkg-config files. I just googled a
little and found some threads on how to use a pkg-config based library with
qmake. It should be a matter of adding the following line to the .pro file:
PKGCONFIG += clam_core clam_processing clam_audioio
Depending on where you installed clam you might need to define the
PKG_CONFIG_PATH environment variable to include the path where the clam .pc
files are placed.
> My current problem is that if I #include "CLAM/Audio.hxx" it builds ok. But
> when I #include "CLAM/AudioFile.hxx" I have the following error message :
>
> g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB
> -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I.
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore
> -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4
> -I-I/usr/local/include -Ibuild -Ibuild -o build/player.o src/player.cpp In
> file included from /usr/local/include/CLAM/AudioFile.hxx:26,
> from src/player.h:10,
> from src/player.cpp:1:
> /usr/local/include/CLAM/AudioFileFormats.hxx:26:2: error: #error
> USE_SNDFILE was not set to 1 in your settings.cfg file, but you are
> including files that require this. Please fix your settings.cfg
Wow, the settings.cfg file is very much obsolete. We should fix that error
message.
> I found no useful help on the web about this... Do I have to rebuild the
> clam libs with a special option ?
No, just adding the options to the command line. pkg-config does that magic
for you.
> I tried to create a settings.cfg in my
> project with the right option but it doesn't work.
Of course.
> I use Debian sid on amd64 , QT4.4.3
Please keep us informed on any progress or further problems.
David.
More information about the clam-devel
mailing list