<div dir="ltr">What is your compile line?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 29, 2013 at 1:56 PM, Arji Cot <span dir="ltr"><<a href="mailto:arjicot@gmail.com" target="_blank">arjicot@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="font-family:courier new,monospace">--------------<br><br>#include <iostream><br><br>int main() {<br>
{<br> extern "C" { int a = 42; }<br> { std::cout << a << "\n"; } <br>
}<br> return (0);<br>}</span><br><br><span style="font-family:courier new,monospace">--------------<br><br>this code fails to compile and the compiler message alone<br><br>main.cpp:5:12: error: expected unqualified-id<br>
extern "C" { int a = 42; }<br> ^<br>1 error generated.<br><br>It's not enough to me to explain why this is not working.<br><br>There is something that I'm missing ?<br></span>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>