<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Clang compile error - enumeration previously ...</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Clang compile error - enumeration previously ...]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 12:17:55 +0000</pubDate>
  <lastBuildDate>Wed, 03 Jul 2024 06:44:51 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=24427</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Clang compile error - enumeration previously ... : Hi,The latest version v24.0.0...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78965&amp;title=clang-compile-error-enumeration-previously#78965</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9632">jkmgs</a><br /><strong>Subject:</strong> 24427<br /><strong>Posted:</strong> 03 July 2024 at 6:44am<br /><br />Hi,<div><br></div><div>The latest version v24.0.0 (Beta 1) still did not fix those issues. Please fix them.</div><div>To summarize, in the file XTPXMLHelpers.h, the following has to be adapted:</div><div><br></div><div>Line 207:</div><div><div style=": rgb252, 252, 252; font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; line-height: 16px; white-space: pre;"><font color="#ff0000">enum tagDOMNodeType</font></div></div><div style="line-height: 16px; white-space: pre; font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace;"><br></div><div style=": rgb252, 252, 252; font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; line-height: 16px; white-space: pre;">to</div><div style=": rgb252, 252, 252; font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; line-height: 16px; white-space: pre;"><br></div><div style="line-height: 16px;"><div style="line-height: 16px;"><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><font color="#00cc00"># if (1700 &lt;= _MSC_VER)</font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><font color="#00cc00">enum tagDOMNodeType : int</font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><font color="#00cc00"># else</font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><font color="#00cc00">enum tagDOMNodeType</font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><font color="#00cc00"># endif</font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><span style="color: #0000ff;"><br></span></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal;">Line 740:</span></div><div style=""><font color="#ff0000"><span style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre; color: rgb0, 0, 255;">enum</span><span style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"> tagXMLEMEM_TYPE</span></font></div><div style=""><br></div><div style="">to</div><div style=""><br></div><div style=""><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><font color="#00cc00"><span style="color: rgb0, 0, 255;"># if</span> (<span style="color: rgb9, 134, 88;">1700</span> &lt;= _MSC_VER)</font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><font color="#00cc00"><span style="color: rgb0, 0, 255;">enum</span> tagXMLEMEM_TYPE : <span style="color: rgb0, 0, 255;">int</span></font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><span style="color: rgb0, 0, 255;"><font color="#00cc00"># else</font></span></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><font color="#00cc00"><span style="color: rgb0, 0, 255;">enum</span> tagXMLEMEM_TYPE</font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><span style="color: rgb0, 0, 255;"><font color="#00cc00"># endif</font></span></div><div style="white-space: pre; font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace;"><br></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal;">Furthermore, in the file XTPScrollable.h change:</span></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif; white-space: normal;">Line 479:</span></div><div style=""><span style="white-space: pre;"><font face="C&#111;nsolas, C&#111;nsolas, Courier New, monospace" color="#ff0000">return CXTPScrollHost::InitializeScrollHost(this, CObject::GetStyle(), CObject::GetExStyle());</font></span></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><br></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;">to</div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><br></div><div style=""><font face="C&#111;nsolas, C&#111;nsolas, Courier New, monospace" color="#00cc00"><span style="white-space: pre;">return CXTPScrollHost::InitializeScrollHost(this, CWnd::GetStyle(), CWnd::GetExStyle());</span></font></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;"><br></div><div style="font-family: C&#111;nsolas, C&#111;nsolas, &quot;Courier New&quot;, monospace; white-space: pre;">or</div><div style=""><font face="C&#111;nsolas, C&#111;nsolas, Courier New, monospace"><span style="white-space: pre;"><br></span></font></div><div style=""><font face="C&#111;nsolas, C&#111;nsolas, Courier New, monospace" color="#00cc00"><span style="white-space: pre;">return CXTPScrollHost::InitializeScrollHost(this, GetStyle(), GetExStyle());</span></font></div><div><br></div><div>Best regards,</div><div>Johannes</div></div></div></div>]]>
   </description>
   <pubDate>Wed, 03 Jul 2024 06:44:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78965&amp;title=clang-compile-error-enumeration-previously#78965</guid>
  </item> 
  <item>
   <title><![CDATA[Clang compile error - enumeration previously ... : Hi,Any updates on this? Would...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78845&amp;title=clang-compile-error-enumeration-previously#78845</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9632">jkmgs</a><br /><strong>Subject:</strong> 24427<br /><strong>Posted:</strong> 25 January 2024 at 5:08am<br /><br />Hi,<div><br></div><div>Any updates on this? Would appreciate it if this problem can be fixed.</div><div><br></div><div>Best regards,</div><div>Johannes</div>]]>
   </description>
   <pubDate>Thu, 25 Jan 2024 05:08:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78845&amp;title=clang-compile-error-enumeration-previously#78845</guid>
  </item> 
  <item>
   <title><![CDATA[Clang compile error - enumeration previously ... : Hi Alexander,Thanks for the reply....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78789&amp;title=clang-compile-error-enumeration-previously#78789</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9632">jkmgs</a><br /><strong>Subject:</strong> 24427<br /><strong>Posted:</strong> 26 September 2023 at 3:33am<br /><br />Hi Alexander,<div><br></div><div>Thanks for the reply. Sad to hear that Clang support is not important as of now. However, this does not change the problem that exists in the source code for which I provided a potential solution above. I don't know if you took a look at the link I included above, but they state: "<span style="font-family: &quot;Times New Roman&quot;; font-size: medium; text-align: justify; : rgb201, 251, 201;">A scoped enumeration shall not be later redeclared as unscoped or with a different underlying type. An unscoped enumeration shall not be later redeclared as scoped and each redeclaration shall include an&nbsp;</span><i style="font-family: &quot;Times New Roman&quot;; font-size: medium; text-align: justify; : rgb201, 251, 201;"><a href="https://tims&#111;ng-cpp.github.io/cppwp/n4140/dcl.enum#nt:enum-base" target="_blank" rel="nofollow">enum-base</a></i><span style="font-family: &quot;Times New Roman&quot;; font-size: medium; text-align: justify; : rgb201, 251, 201;">&nbsp;specifying the same underlying type as in the original declaration.</span>". This is exactly what is done in the source code though as shown above. So this problem is a general C++ problem and not specific to any compiler, thus it is as relevant for MSVC compiler as it is for Clang. So a solution would be greatly appreciated.</div><div><br></div><div>Best regards,</div><div>Johannes</div>]]>
   </description>
   <pubDate>Tue, 26 Sep 2023 03:33:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78789&amp;title=clang-compile-error-enumeration-previously#78789</guid>
  </item> 
  <item>
   <title><![CDATA[Clang compile error - enumeration previously ... : Hello,ToolkitPro never had official...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78788&amp;title=clang-compile-error-enumeration-previously#78788</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8199">astoyan</a><br /><strong>Subject:</strong> 24427<br /><strong>Posted:</strong> 25 September 2023 at 9:53am<br /><br />Hello,<div><br></div><div>ToolkitPro never had official support for Clang compiler,&nbsp;it has always aimed for MSVC support only and it relies heavily on its specific, so adding Clang support isn't going to be an easy task for sure, if possible at all. At least taking this step would require a major demand from ToolkitPro user base, however it's not the case.</div><div><br></div><div>If you want to clang-tidy your project then you simply need to exclude ToolkitPro from this process, even if those fixes will make it work for now, there is no guarantee that it will be working in the future versions of all tools involved.</div><div><br></div><div>Regards,</div><div>&nbsp; &nbsp;Alexander</div>]]>
   </description>
   <pubDate>Mon, 25 Sep 2023 09:53:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78788&amp;title=clang-compile-error-enumeration-previously#78788</guid>
  </item> 
  <item>
   <title><![CDATA[Clang compile error - enumeration previously ... : Hi there,To be able to apply clang-tidy...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78786&amp;title=clang-compile-error-enumeration-previously#78786</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9632">jkmgs</a><br /><strong>Subject:</strong> 24427<br /><strong>Posted:</strong> 25 September 2023 at 5:03am<br /><br /><div>Hi there,</div><div>To be able to apply clang-tidy to our project, I need the Toolkit to compile with Clang. Hereby, I ran into the following four errors, which are all of the same type. Would be great if this could be fixed with the next update:</div><div><br></div><div>1.</div><div><font color="#999999">C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v22.1.0\Source\Common\XTPXMLHelpers.h(207): </font><font color="#ff0000">error: enumeration previously declared with fixed underlying type</font></div><div><font color="#999999">&nbsp; 207 | enum tagDOMNodeType</font></div><div><font color="#999999">&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; ^</font></div><div><font color="#999999">C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v22.1.0\Source\Common\XTPXMLHelpers.h(80): message: previous declaration is here</font></div><div><font color="#999999">&nbsp; &nbsp;80 | XTP_FORWARD_ENUM(tagDOMNodeType);</font></div><div><font color="#999999">&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</font></div><div><br></div><div>2.</div><div><font color="#999999">C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v22.1.0\Source\Common\XTPXMLHelpers.h(740): </font><font color="#ff0000">error: enumeration previously declared with fixed underlying type</font></div><div><font color="#999999">&nbsp; 740 | enum tagXMLEMEM_TYPE</font></div><div><font color="#999999">&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; ^</font></div><div><font color="#999999">C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v22.1.0\Source\Common\XTPXMLHelpers.h(144): message: previous declaration is here</font></div><div><font color="#999999">&nbsp; 144 | XTP_FORWARD_ENUM(tagXMLEMEM_TYPE);</font></div><div><font color="#666666">&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</font><br><br>3.</div><div><div><font color="#999999">C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v22.1.0\Source\GridControl\XTPGridADO.h(1369): </font><font color="#ff0000">error: enumeration previously declared with fixed underlying type</font></div><div><font color="#999999">&nbsp;1369 | enum PositionEnum</font></div><div><font color="#999999">&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; ^</font></div><div><font color="#999999">C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v22.1.0\Source\GridControl\XTPGridADO.h(1071): message: previous declaration is here</font></div><div><font color="#999999">&nbsp;1071 | XTP_FORWARD_ENUM(PositionEnum);</font></div><div><font color="#999999">&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</font></div><div><font color="#999999"><br></font></div><div>4.</div><div><font color="#999999">C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v22.1.0\Source\GridControl\XTPGridADO.h(1422): </font><font color="#ff0000">error: enumeration previously declared with fixed underlying type</font></div><div><font color="#999999">&nbsp;1422 | enum SearchDirectionEnum</font></div><div><font color="#999999">&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; ^</font></div><div><font color="#999999">C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v22.1.0\Source\GridControl\XTPGridADO.h(1073): message: previous declaration is here</font></div><div><font color="#999999">&nbsp;1073 | XTP_FORWARD_ENUM(SearchDirectionEnum);</font></div><div><font color="#999999">&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</font></div></div><div><br></div><div>Related to that, I found this information:&nbsp;<a href="https://tims&#111;ng-cpp.github.io/cppwp/n4140/dcl.enum#3" target="_blank" rel="nofollow">https://timsong-cpp.github.io/cppwp/n4140/dcl.enum#3</a></div><div><br></div><div><div>The issue here seems to be the definition of the XTP_FORWARD_ENUM, found in Source\Common\XTPMacros.h:</div><div><font color="#999999">#<span style="white-space:pre">	</span>if (1700 &lt;= _MSC_VER)</font></div><div><font color="#999999">#<span style="white-space:pre">		</span>define XTP_DECLARE_ENUM(enumName) enum enumName : int</font></div><div><font color="#999999">#<span style="white-space:pre">	</span>else</font></div><div><font color="#999999">#<span style="white-space:pre">		</span>define XTP_DECLARE_ENUM(enumName) enum enumName</font></div><div><font color="#999999">#<span style="white-space:pre">	</span>endif</font></div><div><font color="#999999">#<span style="white-space:pre">	</span>define XTP_FORWARD_ENUM(enumName) XTP_DECLARE_ENUM(enumName)</font></div><div><br></div><div>My compiler is a lot newer than 1700, thus the enums are forward declared with int datatype. Afterwards though, they are redeclared without the int datatype, which is causing the error.</div><div><br></div><div>My solution would be to change the definition of those four enums (the solution applies to all four of them, thus&nbsp;<span style="color: rgb153, 153, 153;">tagDOMNodeType,&nbsp;</span><span style="color: rgb153, 153, 153;">tagXMLEMEM_TYPE,&nbsp;</span><span style="color: rgb153, 153, 153;">PositionEnum,&nbsp;</span><span style="color: rgb153, 153, 153;">SearchDirectionEnum</span>) from:</div><div><br></div><div><font color="#990000">enum PositionEnum</font></div><div><font color="#990000">{ ... }</font></div><div><br></div><div>to:</div><div><br></div><div><font color="#009900">#<span style="white-space: pre;">	</span>if (1700 &lt;= _MSC_VER)</font></div><div><font color="#009900">enum PositionEnum : int</font></div><div><font color="#009900">#<span style="white-space:pre">	</span>else</font></div><div><font color="#009900">enum PositionEnum</font></div><div><font color="#009900">#<span style="white-space:pre">	</span>endif</font></div><div><font color="#009900">{ ... }</font></div></div><div><br></div><div>This fixes the compilation for me.</div><div><br></div><div>Thanks in advance.</div>]]>
   </description>
   <pubDate>Mon, 25 Sep 2023 05:03:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24427&amp;PID=78786&amp;title=clang-compile-error-enumeration-previously#78786</guid>
  </item> 
 </channel>
</rss>