[opensource-dev] C++ Need help to resolve stdint.h typedef conflicts between Quicktime and VS2010

Nicky Perian nickyperian at yahoo.com
Tue Apr 5 14:21:46 PDT 2011


If you are going to stick with vs2010 and not look back the easy solution is 
uninstall the Quicktime SDK and let autobuild deliver the the required items to 
build in package. If you still need to build 1.x or 2.x with develop.py there a 
some include guards that can be used for autobuild and then rename to original 
headers to for develop.py builds.





________________________________
From: Kiptic ‌ <kiptic at hotmail.com>
To: opensource-dev at lists.secondlife.com
Sent: Tue, April 5, 2011 4:12:00 PM
Subject: Re: [opensource-dev] C++ Need help to resolve stdint.h typedef 
conflicts between Quicktime and VS2010

 >  media_plugin_quicktime.cpp
> C:\Program Files (x86)\QuickTime SDK\CIncludes\GNUCompatibility/stdint.h(49): 
> error C2371: 'int_fast16_t' : redefinition; different basic types
>           C:\Program Files (x86)\Microsoft Visual Studio 
> 10.0\VC\include\stdint.h(34) : see declaration of 'int_fast16_t'

> there are more errors like these but the same header just different int's

> I have tried #include <stdint.h> and #undef and that doesn't help.

Oh, interesting, I just had the same problem after switching to VS2010. Thought 
I'd share my solution :)

It turns out the geniuses at Microsoft had decided not to include stdint.h in 
their include directory (which is required by the C99 standard, that Microsoft 
apparently ignores).

This got the Apple people worried, so they added their own stdint.h to the 
QuickTime SDK. Nice, except that now for some unknown reason Microsoft decided 
it was time to add stdint.h to VS2010! Obviously with completely different 
definitions :)

Also, they failed defining the standard _STDINT_H that would tell other headers 
it exists, instead they define _STDINT only. Brilliant.

So, I had to do this:

1. In C:\Program Files (x86)\QuickTime SDK\CIncludes\CoreFoundation, comment out 
this on line 36:
#include <GNUCompatibility/stdint.h>

2. In C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h 
(keep a copy of the original if you like!), change line 4 from this:
#define _STDINT

...to this:
#define _STDINT
#define _STDINT_H

Voilà it now compiles properly, and so should everything else that uses 
stdint.h!

/Kip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20110405/42f40ae3/attachment.htm 


More information about the opensource-dev mailing list