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

Nicky Perian nickyperian at yahoo.com
Mon Apr 11 14:25:05 PDT 2011


Kiptic,

Over this past weekend while working with Ardy Lay I found that my advice to 
uninstall Quicktime SDK was wrong. When uninstalled the system builds a stub 
quicktime_plugin.dll that fails in world when the plugin is invoked.. The 
quicktime from here 
http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/quicktime-7.3-windows-20110127.tar.bz2
 works. But it doesn't download automatically for any Opensource 
configurations.It has a modified stdint.h. I assume this was a vs2010 make work 
mod by linden developers. I have not diffed the entire include yet and there may 
be other modified headers. At one time earlier in autobuild I think this was 
delivered and of course solved the problem of not having a separate quicktime 
SDK for each open source developer.

I work on imprudence also and have the Quicktime SDK installed. I have modified 
headers to make it compile a good plug in when working autobuild 
viewer-development and then return to the original headers when working 
imprudence. This is not ideal but, works.

http://dl.dropbox.com/u/7833186/CGBaseab.h
The ab stands for autobuild and is appended for identification. This replaces 
C:\Program Files (x86)\QuickTime SDK\CIncludes\CGBase.h

http://dl.dropbox.com/u/7833186/stdintab.h
This replaces C:\Program Files (x86)\QuickTime 
SDK\CIncludes\GNUCompatibility\stdint.h

   


Sorry for the confusion,

Nicky



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


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/20110411/f4412fb7/attachment.htm 


More information about the opensource-dev mailing list