Quick fix: modify the atlbase.h header. Change type of m_csStaticDataInit from CRITICAL_SECTION to CRITICAL_SECTION&.
The problem is, type of m_csStaticDataInit is deduced as CRITICAL_SECTION, not CRITICAL_SECTION&, thus the error. I will look into this. On Sat, Apr 20, 2013 at 7:26 PM, Will Wilson <[email protected]> wrote: > Hi All, > > Firstly, a huge thanks to everyone that got this patch in. It's certainly > improved MSVC compatibility by a significant margin. I've been busy testing > it against various windows code bases with positive results. However, it's > not all good news, MFC is fighting back: > > In file included from atlmfc\include\afxwin.h:70: > In file included from atlmfc\include\atlhandler.h:22: > In file included from atlmfc\include\atlstr.h:19: > atlmfc\include\atlbase.h(4546,23): error : cannot take the address of an > rvalue of type 'CRITICAL_SECTION' > EnterCriticalSection(&m_csStaticDataInit); > > The problem source is: > > __declspec(property(get = get_m_csStaticDataInit)) CRITICAL_SECTION > m_csStaticDataInit; > CRITICAL_SECTION& get_m_csStaticDataInit() throw(); > void EnterStaticDataCriticalSection() throw() > { > EnterCriticalSection(&m_csStaticDataInit); > } > > Any easy fixes? If not, I might have a chance to look at it later in the > week. > > Cheers, > Will. > -- Best Regards, Tong Shen (沈彤)
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
