[Matroska-devel] libmatroska fails to compile in Visual Studio 2008 (proposing fix)

Pushkar Pradhan pradhan.pushkar at gmail.com
Fri Jan 22 23:57:43 CET 2010


Hello,
I've just downloaded libebml 0.7.8 and libmatroska 0.8.1. I plan to use
matroska container to package our proprietary multimedia data.
I compiled libebml but libmatroskadll (the dll project) failed to compile. I
am running Visual Studio 2008 SP1 on Windows Vista. Since libmatroska
contains VS 2003 project files, I first ran the upgrade wizard to get VS
2008 project files.

The code that causes this is in KaxContexts.h. I am pasting below the
difference
- extern const EbmlSemanticContext & MATROSKA_DLL_API
GetKaxGlobal_Context();
- extern const EbmlSemanticContext & MATROSKA_DLL_API
GetKaxTagsGlobal_Context();
+ extern MATROSKA_DLL_API const EbmlSemanticContext &
GetKaxGlobal_Context();
+ extern MATROSKA_DLL_API const EbmlSemanticContext &
GetKaxTagsGlobal_Context();

As you know MATROSKA_DLL_API expands to __declspec(dllexport) for a DLL
build. I guess the older code worked in VS 2003 but not in VS 2008.
I apologize if this fix has already been applied to the trunk code. I don't
know because I cannot access the repository, I have only somehow managed to
get the libebml and libmatroska sources from
http://www.bunkus.org/videotools/mkvtoolnix/sources/ after a lot of
searching.

I would also like to contribute VS 2008 project files (the wizard generated
project files don't have the proper dependencies) if the matroska team wants
it?
Other issues with the VS 2008 compiler: Generates 500+ warnings for libebml
and libmatroska, most of them are due to usage of sprintf, strcpy,
comparison and assignment between 64 and 32 bit integers etc. I think it
would be a good idea to silence the compiler by modifying the project
settings.

Thank you for libmatroska.
pushkar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20100122/76819266/attachment.html>


More information about the Matroska-devel mailing list