[Anjuta-list] Trying to build a code using Anjuta
- From: Javier Garcia <tirengarfio yahoo es>
- To: anjuta-list lists sourceforge net
- Subject: [Anjuta-list] Trying to build a code using Anjuta
- Date: Thu, 17 Jul 2008 12:00:55 +0000 (GMT)
Hi,
im trying to compile and build the code below.
The code plays an .ogg video file using the liboggz libraries.
I compile the code without errors but when i try to build it, Anjuta gives some errors (i paste them below the code):
I
ask the people who develop these libraries, but they don't know what I
should do with Anjuta in order to not get those build errors.
There is here some info about the configuration of liboggz. Maybe I can serve you some:
http://annodex.net/software/liboggz/html/group__building.html
Here is also the library (if someone want install it) that you can install with sudo ./configure - make - make install :
http://annodex.net/software/liboggz/download/
Bye
Javi
This is the code:
#include "/home/tirengarfio/Projects/reproductor_ogg/config.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_INTTYPES_H
# include
<inttypes.h>
#else
# define PRId64 "I64d"
#endif
#include <oggz/oggz.h>
static int got_an_eos = 0;
static void
print_granulepos (ogg_int64_t granulepos, int granuleshift)
{
if (granuleshift < 1) {
//printf ("%" PRId64, granulepos);
} else {
ogg_int64_t iframe, pframe;
iframe = granulepos >> granuleshift;
pframe = granulepos - (iframe << granuleshift);
//printf ("%" PRId64 "|%" PRId64, iframe, pframe);
}
}
static int
read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
{
int granuleshift;
granuleshift = oggz_get_granuleshift (oggz, serialno);
printf ("%010ld: op->granulepos: ", serialno);
print_granulepos (op->granulepos,
granuleshift);
printf (" oggz_tell_granulepos(): ");
print_granulepos (oggz_tell_granulepos (oggz), granuleshift);
if (op->b_o_s) {
printf (" *** bos");
}
if (op->e_o_s) {
got_an_eos = 1;
printf (" *** eos");
}
printf ("\n");
return 0;
}
int
main (int argc, char ** argv)
{
OGGZ * oggz;
if (argc < 2) {
printf ("usage: %s filename\n", argv[0]);
}
if ((oggz = oggz_open ((char *)argv[1], OGGZ_READ | OGGZ_AUTO)) == NULL) {
printf ("unable to open file %s\n", argv[1]);
exit (1);
}
oggz_set_read_callback (oggz, -1, read_packet, NULL);
oggz_run (oggz);
oggz_close (oggz);
exit
(0);
}
BUILDING ERRORS
make
make all-recursive
make[1]: se ingresa al directorio `/home/tirengarfio/Projects/reproductor_ogg'
Making all in po
make[2]: se ingresa al directorio `/home/tirengarfio/Projects/reproductor_ogg/po'
make[2]: No se hace nada para `all'.
make[2]: se sale del directorio `/home/tirengarfio/Projects/reproductor_ogg/po'
Making all in src
make[2]: se ingresa al directorio `/home/tirengarfio/Projects/reproductor_ogg/src'
/bin/bash ../libtool --tag=CXX --mode=link g++ -Wall -g -g -O2 -o reproductor_ogg main.o
g++ -Wall -g -g -O2 -o reproductor_ogg main.o
main.o: In function `main':
/home/tirengarfio/Projects/reproductor_ogg/src/main.cc:100: undefined reference to `oggz_open'
/home/tirengarfio/Projects/reproductor_ogg/src/main.cc:105: undefined reference to
`oggz_set_read_callback'
/home/tirengarfio/Projects/reproductor_ogg/src/main.cc:107: undefined reference to `oggz_run'
/home/tirengarfio/Projects/reproductor_ogg/src/main.cc:109: undefined reference to `oggz_close'
main.o: In function `read_packet':
/home/tirengarfio/Projects/reproductor_ogg/src/main.cc:70: undefined reference to `oggz_get_granuleshift'
/home/tirengarfio/Projects/reproductor_ogg/src/main.cc:75: undefined reference to `oggz_tell_granulepos'
collect2: ld returned 1 exit status
make[2]: *** [reproductor_ogg] Error 1
make[2]: se sale del directorio `/home/tirengarfio/Projects/reproductor_ogg/src'
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
make[1]: se sale del directorio `/home/tirengarfio/Projects/reproductor_ogg'
Completado… incorrectamente
Tiempo total empleado: 0 segundos
Enviado desde Correo Yahoo!
La bandeja de entrada más inteligente.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]