<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic this declaration may not have extern &amp;quot;C&amp;quot; linkage while porting C++ code from sunos to HP in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/this-declaration-may-not-have-extern-quot-c-quot-linkage-while/m-p/4123028#M92980</link>
    <description>Hi, &lt;BR /&gt;&lt;BR /&gt;Im porting a source code base from sunos to HP-UX. While compiling &lt;BR /&gt;some sources, Im getting the errors like &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/opt/aCC/include/rw/xphasht.h", line 161: error #2800: this &lt;BR /&gt;declaration may not have extern "C" linkage &lt;BR /&gt;  template &lt;CLASS tp=""&gt; class RWTExport RWTPtrHashTableIterator; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"/opt/aCC/include/rw/xphasht.h", line 173: error #2800: this &lt;BR /&gt;declaration may not have extern "C" linkage &lt;BR /&gt;  template &lt;CLASS tp=""&gt; class RWTExport RWTPtrHashTable &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/opt/aCC/include/rw/xpslist.cc", line 416: error #2800: this &lt;BR /&gt;declaration may not have extern "C" linkage &lt;BR /&gt;  template &lt;CLASS tp=""&gt; RWTPtrSlink&lt;TP&gt;* &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there some changes required while using roguewave libraries on HP? &lt;BR /&gt;The compile command is &lt;BR /&gt;aCC -w -Aa -AP -library=std,rwtools7,stream,Csup +p +Z -DUNIX -DSYSV - &lt;BR /&gt;D_XOPEN_SOURCE &lt;BR /&gt;-D_POSIX_SOURCE -D_HPUX_SOURCE -DRW_NO_STL -DINF_UNIX_SRC -DINF_N_MENU &lt;BR /&gt;-D__EXTERN_C__ &lt;BR /&gt;-DAR_CPLUSPLUS -D__COMP_FILE__= &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/TP&gt;&lt;/CLASS&gt;&lt;/CLASS&gt;&lt;/CLASS&gt;</description>
    <pubDate>Wed, 02 Jan 2008 07:14:29 GMT</pubDate>
    <dc:creator>Sanjesh</dc:creator>
    <dc:date>2008-01-02T07:14:29Z</dc:date>
    <item>
      <title>this declaration may not have extern "C" linkage while porting C++ code from sunos to HP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/this-declaration-may-not-have-extern-quot-c-quot-linkage-while/m-p/4123028#M92980</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;Im porting a source code base from sunos to HP-UX. While compiling &lt;BR /&gt;some sources, Im getting the errors like &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/opt/aCC/include/rw/xphasht.h", line 161: error #2800: this &lt;BR /&gt;declaration may not have extern "C" linkage &lt;BR /&gt;  template &lt;CLASS tp=""&gt; class RWTExport RWTPtrHashTableIterator; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"/opt/aCC/include/rw/xphasht.h", line 173: error #2800: this &lt;BR /&gt;declaration may not have extern "C" linkage &lt;BR /&gt;  template &lt;CLASS tp=""&gt; class RWTExport RWTPtrHashTable &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/opt/aCC/include/rw/xpslist.cc", line 416: error #2800: this &lt;BR /&gt;declaration may not have extern "C" linkage &lt;BR /&gt;  template &lt;CLASS tp=""&gt; RWTPtrSlink&lt;TP&gt;* &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there some changes required while using roguewave libraries on HP? &lt;BR /&gt;The compile command is &lt;BR /&gt;aCC -w -Aa -AP -library=std,rwtools7,stream,Csup +p +Z -DUNIX -DSYSV - &lt;BR /&gt;D_XOPEN_SOURCE &lt;BR /&gt;-D_POSIX_SOURCE -D_HPUX_SOURCE -DRW_NO_STL -DINF_UNIX_SRC -DINF_N_MENU &lt;BR /&gt;-D__EXTERN_C__ &lt;BR /&gt;-DAR_CPLUSPLUS -D__COMP_FILE__= &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/TP&gt;&lt;/CLASS&gt;&lt;/CLASS&gt;&lt;/CLASS&gt;</description>
      <pubDate>Wed, 02 Jan 2008 07:14:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/this-declaration-may-not-have-extern-quot-c-quot-linkage-while/m-p/4123028#M92980</guid>
      <dc:creator>Sanjesh</dc:creator>
      <dc:date>2008-01-02T07:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: this declaration may not have extern "C" linkage while porting C++ code from sunos to HP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/this-declaration-may-not-have-extern-quot-c-quot-linkage-while/m-p/4123029#M92981</link>
      <description>It helps if you mention your OS, 11.23?  And your compiler version, aCC6?&lt;BR /&gt;&lt;BR /&gt;Your problem may be due to the fact that is never a good idea to use this coding pattern:&lt;BR /&gt;extern "C" {&lt;BR /&gt;#include some file that includes unknown others&lt;BR /&gt;}&lt;BR /&gt;The proper form is:&lt;BR /&gt;extern "C" {&lt;BR /&gt;...&lt;BR /&gt;}&lt;BR /&gt;#include ...&lt;BR /&gt;extern "C" {&lt;BR /&gt;...&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;All of the aC++ headers and most system headers are already C++ified and adding an extern "C" block will just mess up overloading.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Is there some changes required while using roguewave libraries on HP?&lt;BR /&gt;&lt;BR /&gt;You're using tools.h++?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The compile command is: aCC -w -Aa -AP&lt;BR /&gt;&lt;BR /&gt;For IPF, the default is almost -AA.  You shouldn't be using the -AP libs and should use -AA explicitly.  Which may require a port to -AA if you ever plan to use third party shlibs.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;-library=std,rwtools7,stream,Csup&lt;BR /&gt;&lt;BR /&gt;This is the wrong format for -l and you should let the compiler add the default aC++ runtime shlibs.&lt;BR /&gt;You may have to add -lrwtools7?  Is this your shlib?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;-DRW_NO_STL&lt;BR /&gt;&lt;BR /&gt;This is NOT supported with HP's version of tools.h++.</description>
      <pubDate>Wed, 02 Jan 2008 15:20:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/this-declaration-may-not-have-extern-quot-c-quot-linkage-while/m-p/4123029#M92981</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-01-02T15:20:35Z</dc:date>
    </item>
  </channel>
</rss>

