[theora] compile error of libtheora example

Ralph Giles giles at xiph.org
Mon May 11 19:48:16 PDT 2009


2009/5/11 Samul Kevin <lovesummerf at gmail.com>:

> ivysummer at ivysummer-desktop:~/桌面/libtheora-1.0/examples$ gcc -o player
> player_example.c
> /tmp/ccpyle3c.o: In function `buffer_data':
> player_example.c:(.text+0x15): undefined reference to `ogg_sync_buffer'
> player_example.c:(.text+0x4f): undefined reference to `ogg_sync_wrote'

You need to link the examples with the libraries they depend on. For example:

gcc -o player player_example.c -lvorbis -ltheora -logg -lSDL -lm

These will provide definitions for the referenced symbols. This should
happen automatically if you used the provided './configure && make' or
'scons' build systems.

 -r


More information about the theora mailing list