[vorbis] Visual Studio .NET

Shon Ferguson shonferg at adelphia.net
Tue Apr 16 17:11:03 PDT 2002



Maybe you're getting the same error I was?  Try using the Multithreaded DLL
Libraries to compile.  That's the only way I could get it to work on Win2000
without causing a segment fault.  Perhaps it seems works on other versions
of Windows but causes memory corruption?

--Shon

-----Original Message-----
From: owner-vorbis at xiph.org [mailto:owner-vorbis at xiph.org]On Behalf Of
Daniel Vogel
Sent: Tuesday, April 16, 2002 3:26 PM
To: vorbis at xiph.org
Subject: RE: [vorbis] Visual Studio .NET

<p>> Check the project settings and find Struct Member Alignment. All the Ogg
> Vorbis precompiled runtimes are compiled with 8 byte alignment. If your
> projects are being compiled with another byte alignment, you will probably
> crash when linked to the runtimes.

I explicitely use the pack pragma around vorbis header includes but I
shouldn't have to do this myself - this should be done in the header files
itself! AFAICT Ogg Vorbis is the only library requiring me to do this. And
if it can't be done in a portable way (which I doubt) then you should have
to pass in the size of the struct to function calls - the current approach
is very error prone and unprofessional IMO. I'm quite opinionated on this as
you can tell ;)

Anyways, this isn't the reason of the crash (which btw happens in ov_open).
I guess I'll have to recompile it with VS.NET though the problem being
persistent means that customers won't be able to use the official versions
and updates with our engine.

<p>> <opinion>
> In fact, the Ogg Vorbis sources *should* have some form of alignment
> specification around all the structures declared in the header files. Like
> #pragma pack(push, 8) (yes I know this form does not exist on all

The equivalent does exist on all compilers we compile with. VC6/7,
Metrowerks, gcc, Intel C++ for both Windows and Linux, ... Since version 3.0
gcc supports the pack pragrma and for older versions you can use
"__attribute__((packed,aligned(8)))".

<p>-- Daniel, Epic Games Inc.

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list