Hi all,

Are there any examples anywhere of the use of CreateAviPlayer? (not
CreateAviPlayer2)

I'm damned if I can get it working.

I've got the following code (it's not designed to actually do anything,
I just want it to compile cleanly at this stage):


//=========================================================================
#include <aviplay.h>
#include <avifile.h>
#include <stdio.h>

#define AVM_COMPATIBLE

AVM_BEGIN_NAMESPACE;

int main(int argc,char **argv) {


        avm::IAviPlayer* player = CreateAviPlayer ("/home/paul/dev/avi/sample.wma",
                        0,0,0,0,0);
}

AVM_END_NAMESPACE;
//=========================================================================

If I compile this, I get the following:

gcc -c file.cpp -I/usr/include/avifile
gcc -o file file.o player.o -laviplay
/usr/lib/crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
file.o(.text+0x19): In function `avm::main(int, char **)':
: undefined reference to `avm::CreateAviPlayer(char const *, int, char const *, 
:unsigned int, char const *, char const *)'
collect2: ld returned 1 exit status
make: *** [file] Error 1


Clearly I'm not using it properly, but I've no idea how to get it going. 

If I try to compile the program without the AVM_BEGIN_NAMESPACE and
AVM_END_NAMESPACE lines, then the preprocessor can't even find the
CreateAviPlayer function in the headers:

gcc -c file.cpp -I/usr/include/avifile
file.cpp: In function `int main(int, char **)':
file.cpp:18: implicit declaration of function `int CreateAviPlayer(...)'
file.cpp:18: initialization to `avm::IAviPlayer *' from `int' lacks a cast
make: *** [file.o] Error 1


Does anyone have any pointers?

Cheers,

Paul.

-- 
Paul Dwerryhouse

"Why not just have the arresting officer execute you on the spot? If you turn 
 out to be innocent, they can cancel the invoice for the bullet." -- sharkey

_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile

Reply via email to