<?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 C++ template problem with DEC C/C++ compiler V5.6 in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/c-template-problem-with-dec-c-c-compiler-v5-6/m-p/4104370#M38800</link>
    <description>I have an Alpha system running on OpenVMS V7.1 with DEC C/C++ compiler V5.6. CXXLINK prints an error message "undefined symbol" when I try to link a C++ program using templates. Following is the test.cxx program (by the way this program is compiled and linked OK with HP C++ compiler V6.5).&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO&gt;&lt;BR /&gt;&lt;BR /&gt;template &lt;CLASS t=""&gt; void f(T) {&lt;BR /&gt;  printf("In template f\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;void f(int);&lt;BR /&gt;&lt;BR /&gt;int main() {&lt;BR /&gt;  f(0);&lt;BR /&gt;  f(0.0);&lt;BR /&gt;  return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;void f(int) {&lt;BR /&gt;  printf("In non-template f\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CXX test.cxx             ok&lt;BR /&gt;CXXLINK test&lt;BR /&gt;&lt;BR /&gt;   f(p1);&lt;BR /&gt;%CXX-E-UNDECLARED, In this statement, "f" is not declared.&lt;BR /&gt;at line number 4 in file [.CXX_REPOSITORY]F__XD.CXX;4&lt;BR /&gt;%LINK-W-NUDFSYMS, 1 undefined symbol:&lt;BR /&gt;%LINK-I-UDFSYM,      void f(double)&lt;BR /&gt;%LINK-W-USEUNDEF, undefined symbol void f(double) referenced&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;***  Please let me know what can I do to get this program to work with C++ compiler V5.6, or do I have to upgrade to newer version of HP CXX compiler. &lt;BR /&gt;If I need to upgrade newer version of HP CXX compiler (like V6.0 or above), where can I get the compiler.&lt;BR /&gt;&lt;BR /&gt;Attached is the test.cxx file.&lt;BR /&gt;&lt;BR /&gt;Best regards.&lt;/CLASS&gt;&lt;/STDIO&gt;</description>
    <pubDate>Fri, 16 Nov 2007 18:57:58 GMT</pubDate>
    <dc:creator>tnguyen</dc:creator>
    <dc:date>2007-11-16T18:57:58Z</dc:date>
    <item>
      <title>C++ template problem with DEC C/C++ compiler V5.6</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-template-problem-with-dec-c-c-compiler-v5-6/m-p/4104370#M38800</link>
      <description>I have an Alpha system running on OpenVMS V7.1 with DEC C/C++ compiler V5.6. CXXLINK prints an error message "undefined symbol" when I try to link a C++ program using templates. Following is the test.cxx program (by the way this program is compiled and linked OK with HP C++ compiler V6.5).&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO&gt;&lt;BR /&gt;&lt;BR /&gt;template &lt;CLASS t=""&gt; void f(T) {&lt;BR /&gt;  printf("In template f\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;void f(int);&lt;BR /&gt;&lt;BR /&gt;int main() {&lt;BR /&gt;  f(0);&lt;BR /&gt;  f(0.0);&lt;BR /&gt;  return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;void f(int) {&lt;BR /&gt;  printf("In non-template f\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CXX test.cxx             ok&lt;BR /&gt;CXXLINK test&lt;BR /&gt;&lt;BR /&gt;   f(p1);&lt;BR /&gt;%CXX-E-UNDECLARED, In this statement, "f" is not declared.&lt;BR /&gt;at line number 4 in file [.CXX_REPOSITORY]F__XD.CXX;4&lt;BR /&gt;%LINK-W-NUDFSYMS, 1 undefined symbol:&lt;BR /&gt;%LINK-I-UDFSYM,      void f(double)&lt;BR /&gt;%LINK-W-USEUNDEF, undefined symbol void f(double) referenced&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;***  Please let me know what can I do to get this program to work with C++ compiler V5.6, or do I have to upgrade to newer version of HP CXX compiler. &lt;BR /&gt;If I need to upgrade newer version of HP CXX compiler (like V6.0 or above), where can I get the compiler.&lt;BR /&gt;&lt;BR /&gt;Attached is the test.cxx file.&lt;BR /&gt;&lt;BR /&gt;Best regards.&lt;/CLASS&gt;&lt;/STDIO&gt;</description>
      <pubDate>Fri, 16 Nov 2007 18:57:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-template-problem-with-dec-c-c-compiler-v5-6/m-p/4104370#M38800</guid>
      <dc:creator>tnguyen</dc:creator>
      <dc:date>2007-11-16T18:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: C++ template problem with DEC C/C++ compiler V5.6</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-template-problem-with-dec-c-c-compiler-v5-6/m-p/4104371#M38801</link>
      <description>&amp;gt; [..] C++ compiler V5.6 [...]&lt;BR /&gt;&lt;BR /&gt;Sometimes the "-xxx" in the version matters,&lt;BR /&gt;but that one's pretty old, isn't it?  ("July&lt;BR /&gt;22, 1997", it says in my release notes.)&lt;BR /&gt;&lt;BR /&gt;I know nothing (or almost nothing) about C++,&lt;BR /&gt;but I do have one:&lt;BR /&gt;&lt;BR /&gt;alp $ cxx /version&lt;BR /&gt;HP C++ V7.3-009 for OpenVMS Alpha V7.3-2&lt;BR /&gt;&lt;BR /&gt;(_Its_ release notes say, "April 3, 2007".)&lt;BR /&gt;&lt;BR /&gt;And, around here:&lt;BR /&gt;&lt;BR /&gt;alp $ cxx 295792.cxx&lt;BR /&gt;alp $ cxxlink 295792.obj&lt;BR /&gt;alp $ run 295792.exe&lt;BR /&gt;In non-template f&lt;BR /&gt;In template f&lt;BR /&gt;alp $&lt;BR /&gt;&lt;BR /&gt;So, knowing nothing, I'd say that a newer&lt;BR /&gt;compiler might help in your case.</description>
      <pubDate>Fri, 16 Nov 2007 21:19:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-template-problem-with-dec-c-c-compiler-v5-6/m-p/4104371#M38801</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-11-16T21:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: C++ template problem with DEC C/C++ compiler V5.6</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-template-problem-with-dec-c-c-compiler-v5-6/m-p/4104372#M38802</link>
      <description>To run experiments with current software&lt;BR /&gt;yourself, you might investigate:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.testdrive.hp.com" target="_blank"&gt;http://www.testdrive.hp.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Only IA64 systems, now, for VMS, but many&lt;BR /&gt;things work the same.</description>
      <pubDate>Fri, 16 Nov 2007 23:36:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-template-problem-with-dec-c-c-compiler-v5-6/m-p/4104372#M38802</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-11-16T23:36:50Z</dc:date>
    </item>
  </channel>
</rss>

