I was having a link problem with avifile:
g++ -g testeavi.cpp -c -o testeavi.o `avifile-config --cflags` `sdl-config --cflags`
g++ testeavi.o -o testeavi `avifile-config --libs` `sdl-config --static-libs`
testeavi.o(.text+0x1c4): In function `main':
/usr/src/matic/testeavi/testeavi.cpp:66: undefined reference to `avm::CreateAviPlayer(char const*, int, char const*, unsigned, char const*, char const*)'
collect2: ld returned 1 exit status
make: *** [testeavi] Error 1
Looking at the symbols in the library and my own testeavi.o, I could see the C++ name mangling for the CreateAviPlayer method is different in each, which is the reason for this error:
In libaviplay.so --> _ZN3avm15CreateAviPlayerEPKciS1_mS1_S1_ In my testeavi.o --> _ZN3avm15CreateAviPlayerEPKciS1_jS1_S1_
This would normally indicate that the two functions (header and implementation) have different parameters, and indeed, in file lib/aviplay/aviplay.cpp the parameter flags is an unsigned long, whereas in the header file it is unsigned int. Changing the header file's parameter to long solved the problem. I have not checked if there are other functions with the same problem.
Rodrigo
_______________________________________________ Avifile mailing list [email protected] http://prak.org/mailman/listinfo/avifile
