[Libav-user] Building with MSVC toolchain resulting in seeking problem?

Hendrik Leppkes h.leppkes at gmail.com
Wed Mar 13 09:45:31 CET 2013

On Wed, Mar 13, 2013 at 8:39 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> John Orr <john.orr at ...> writes:
>> On 3/12/2013 7:18 PM, John Orr wrote:
>> >
>> >> If not: Does --enable-small work?
>> >
>> > I'll try in a little bit.
>> >
>> Nope. --enable-small gets the same link error.
> I suspect if this is fixed, it will be easier to
> understand how to map -O0 to to something that
> works in msvc_flags() in configure.
> I looked here to find out what could make the difference:
> http://msdn.microsoft.com/en-us/library/k1ack8f1%28v=vs.100%29.aspx
> But did not find anything obvious, testing will be necessary.

MSVC optimization options are not as fine-grained as other compilers.
The option that turns on dead-code elim also turns on all sorts of
other optimizations that strip out the local variable infos.

What i do when i want to debug a specific piece of code is to turn the
optimizer off for that part of the code, which can be done with a
compiler pragma like this:
#pragma optimize("", off)

And any code following it will not be optimized at all, while keeping
all other files optimized.

Like people pointed out before, the only thing really required is to
turn off frame pointer suppression, otherwise debugging is no fun at
I have a local patch for that, which makes --enable-debug build a
debuggable MSVC version with all the appropriate options (frame
pointers, proper debug info generation), i'll send it to the ML in a
few days, after all the merge noise has died down a bit and i rebased
my local patches on top of it.

- Hendrik

More information about the Libav-user mailing list