Note that there are some explanatory texts on larger screens.

plurals
  1. POC++ code compiles in CentOS g++, but not in Visual studio 2008
    primarykey
    data
    text
    <p>I have a problem: My codes work well in CentOS g++, but when I compile them in visual studio 2008, the visual studio tells me errors like below:</p> <blockquote> <p>1.c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(19) : error C2144: syntax error : '__w64 unsigned int' should be preceded by '}'</p> <p>2.error C2143: syntax error : missing '}' before 'namespace'.</p> </blockquote> <p>My file coding is UTF-8. Should I change them in Unicode all, I change some error file in Unicode,it still has errors like above. </p> <p>below are some sourecode:</p> <pre><code>#ifndef ENRC_CODE_DEFS_H #define ENRC_CODE_DEFS_H enum ENReturnCode { ENRC_SUCCESS = 0, ENRC_FAILED, ENRC_NODATA, ENRC_CONFIG_NOT_AVAILABLE, ENRC_INVALID_SUBSCRIBE_ID, ENRC_INVALID_SUBSCRIBE_CONDITION, ENRC_INVALID_SUBSCRIBER, ENRC_INVALID_PARAMETER, ENRC_THREAD_RUNNING, ENRC_SUBSCRIBE_LIST_EMPTY, ENRC_OUT_OF_MEMORY // 10 } </code></pre> <p><code>e:\my_code\cppcommon\include\errordefs.h(5) : error C2143: syntax error : missing ';' before 'enum [tag]'</code></p> <p>next:</p> <pre><code>#ifndef EN_SMS_SRC_TAO2CPP_H_ #define EN_SMS_SRC_TAO2CPP_H_ #include "SystemMonitorMasterServiceC.h" #include "SystemMonitorSlaveServiceC.h" #include "CommonDefs.h" #include "SystemMonitorServiceDataDefs.h" namespace EN { namespace SMS { template &lt; typename _Ty, typename _Cy&gt; inline void Tao2Cpp_Enum(_Ty taoValue, _Cy &amp;cppValue) { cppValue = (_Cy)taoValue; } </code></pre> <p><code>error C2143: syntax error : missing '}' before 'namespace'</code></p> <p>A lot of errors like above.</p> <p>Thanks. I waste some time to make it easy to read.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload