<div dir="ltr">Quick fix: modify the atlbase.h header. Change type of <span style="font-family:arial,sans-serif;font-size:13px">m_csStaticDataInit from </span><span style="font-family:arial,sans-serif;font-size:13px">CRITICAL_SECTION to </span><span style="font-family:arial,sans-serif;font-size:13px">CRITICAL_SECTION&.</span><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">The problem is, type of </span><span style="font-family:arial,sans-serif;font-size:13px">m_csStaticDataInit is deduced as </span><span style="font-family:arial,sans-serif;font-size:13px">CRITICAL_SECTION, not </span><span style="font-family:arial,sans-serif;font-size:13px">CRITICAL_SECTION&, thus the error.</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">I will look into this.</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 20, 2013 at 7:26 PM, Will Wilson <span dir="ltr"><<a href="mailto:will@indefiant.com" target="_blank">will@indefiant.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>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:</div>

<div><br></div><div><div>  In file included from atlmfc\include\afxwin.h:70:</div><div>  In file included from atlmfc\include\atlhandler.h:22:</div><div>  In file included from atlmfc\include\atlstr.h:19:</div>
<div>  atlmfc\include\atlbase.h(4546,23): error : cannot take the address of an rvalue of type 'CRITICAL_SECTION'</div><div>                  EnterCriticalSection(&m_csStaticDataInit);</div><div><br></div><div>

The problem source is:</div><div><br></div><div><div><span style="white-space:pre-wrap">    </span>__declspec(property(get  = get_m_csStaticDataInit)) CRITICAL_SECTION m_csStaticDataInit;</div><div><span style="white-space:pre-wrap">        </span>CRITICAL_SECTION& get_m_csStaticDataInit() throw();</div>

<div><span style="white-space:pre-wrap">  </span>void EnterStaticDataCriticalSection() throw()</div><div><span style="white-space:pre-wrap">    </span>{</div><div><span style="white-space:pre-wrap">                </span>EnterCriticalSection(&m_csStaticDataInit);</div>

<div><span style="white-space:pre-wrap">  </span>}</div><div><br></div><div>Any easy fixes? If not, I might have a chance to look at it later in the week.</div><div><br></div><div>Cheers,</div><div>
Will.</div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards, Tong Shen (沈彤)
</div>