I decided to bite the bullet and grabbed the latest changes out of subversion. Compiled fine (with a few cast changes), but for some reason none of the encoding functions are linking. (Decoding appears to link just fine.) Any ideas what I did wrong? Here's what I did: 1) Downloaded a clean copy of the latest contents of Subversion using: svn co http://svn.xiph.org/trunk/theora 2) Opened 'theora\win32\theora_static.dsp' in Visual Studio .NET 2003 (automatically converted/upgraded on open) 3) Successfully built 'theora\win32\static_debug\theora_static_d.lib' 4) Recompiled my application using the newest theora headers ... repeat with ogg, vorbis, and speex ... 5) Made some very minor changes to my code so it'd compile (change casting from signed to unsigned chars in a couple places) 6) Linked my application and it failed to find the following functions: _theora_encode_tables _theora_encode_comment _theora_encode_header _theora_encode_init _theora_encode_packetout _theora_encode_YUVin _theora_encoder_clear referenced in function _theora_clear For some reason all the unlinkable functions have underscore prefixes, even though my code has none. Were any changes made to the encoding function prototypes since 1.0a3? Thanks, I'm really eager to try out the new code! -david
I see the line in CHANGES: * optional support for building without encode support Maybe I disabled encoding support (or failed to enable it) by accident? I've poked around the code a bit, but I don't see what I'm supposed to do. How do I explicitly enable encoding support? -david> -----Original Message----- > From: theora-dev-bounces@xiph.org [mailto:theora-dev-bounces@xiph.org] On > Behalf Of David Barrett > Sent: Saturday, October 09, 2004 7:29 PM > To: theora-dev@xiph.org > Subject: [Theora-dev] Encoder not linking on win32? > > I decided to bite the bullet and grabbed the latest changes out of > subversion. Compiled fine (with a few cast changes), but for some reason > none of the encoding functions are linking. (Decoding appears to link > just > fine.) Any ideas what I did wrong? > > Here's what I did: > > 1) Downloaded a clean copy of the latest contents of Subversion using: > > svn co http://svn.xiph.org/trunk/theora > > 2) Opened 'theora\win32\theora_static.dsp' in Visual Studio .NET 2003 > (automatically converted/upgraded on open) > > 3) Successfully built 'theora\win32\static_debug\theora_static_d.lib' > > 4) Recompiled my application using the newest theora headers > > ... repeat with ogg, vorbis, and speex ... > > 5) Made some very minor changes to my code so it'd compile (change casting > from signed to unsigned chars in a couple places) > > 6) Linked my application and it failed to find the following functions: > > _theora_encode_tables > _theora_encode_comment > _theora_encode_header > _theora_encode_init > _theora_encode_packetout > _theora_encode_YUVin > _theora_encoder_clear referenced in function _theora_clear > > For some reason all the unlinkable functions have underscore prefixes, > even > though my code has none. Were any changes made to the encoding function > prototypes since 1.0a3? > > Thanks, I'm really eager to try out the new code! > > -david > > _______________________________________________ > Theora-dev mailing list > Theora-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/theora-dev
On Sat, Oct 09, 2004 at 07:28:53PM -0600, David Barrett wrote:> I decided to bite the bullet and grabbed the latest changes out of > subversion. Compiled fine (with a few cast changes), but for some reason > none of the encoding functions are linking. (Decoding appears to link just > fine.) Any ideas what I did wrong? > > Here's what I did: > > 1) Downloaded a clean copy of the latest contents of Subversion using: > > svn co http://svn.xiph.org/trunk/theora > > 2) Opened 'theora\win32\theora_static.dsp' in Visual Studio .NET 2003 > (automatically converted/upgraded on open) > > 3) Successfully built 'theora\win32\static_debug\theora_static_d.lib' > > 4) Recompiled my application using the newest theora headers > > ... repeat with ogg, vorbis, and speex ... > > 5) Made some very minor changes to my code so it'd compile (change casting > from signed to unsigned chars in a couple places) > > 6) Linked my application and it failed to find the following functions: > > _theora_encode_tables > _theora_encode_comment > _theora_encode_header > _theora_encode_init > _theora_encode_packetout > _theora_encode_YUVin > _theora_encoder_clear referenced in function _theora_clear > > For some reason all the unlinkable functions have underscore prefixes, even > though my code has none. Were any changes made to the encoding function > prototypes since 1.0a3?ahh, it may be that you need to set THEORA_SUPPORT_ENCODE to 1 in the project somewhere. For autotools and symbian builds we include a config.h file, but there doesn't seem to be one in win32. Conrad.
----- Original Message ----- From: "David Barrett" <dbarrett@quinthar.com> To: <theora-dev@xiph.org> Sent: Sunday, October 10, 2004 9:28 AM Subject: [Theora-dev] Encoder not linking on win32?> 5) Made some very minor changes to my code so it'd compile (change casting > from signed to unsigned chars in a couple places) > > 6) Linked my application and it failed to find the following functions: > > _theora_encode_tables > _theora_encode_comment > _theora_encode_header > _theora_encode_init > _theora_encode_packetout > _theora_encode_YUVin > _theora_encoder_clear referenced in function _theora_clear > > For some reason all the unlinkable functions have underscore prefixes, > even > though my code has none. Were any changes made to the encoding function > prototypes since 1.0a3? > > Thanks, I'm really eager to try out the new code! >I'd suggest you didn't clean it properly the first time... so the firt link that actually worked... was a link to an old version that was already built on your system ? Is that a possibility ? If the functions really aren't exposed... it doesn't make sense it would link once and then not any more. Also, the underscores are part of the name mangling... ignore the leading underscore. Also... maybe you could post the full link error (all the text including the name mangling) for one of those errors ? Also, are you sure your calling application is using the same calling convention ? ie __cdecl ? Chances are if it's a C++ program you are calling from you are using __stdcall or __thiscall convention. But since one of those link errors is internal... ie theora_clear calling encoder_clear, try finding these encode functions and see if there is a big #ifdef around them stopping them building... if there is, you'll need to define the symbol appropriately somewhere. Zen.