<?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 Re: compilation error in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287476#M44712</link>
    <description>&lt;BR /&gt;you're including cwchar, not cwchar.h&lt;BR /&gt;&lt;BR /&gt;does that matter?&lt;BR /&gt;&lt;BR /&gt;does the order you reference matter?&lt;BR /&gt;</description>
    <pubDate>Wed, 15 Oct 2008 15:34:47 GMT</pubDate>
    <dc:creator>Gregg Parmentier</dc:creator>
    <dc:date>2008-10-15T15:34:47Z</dc:date>
    <item>
      <title>compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287473#M44709</link>
      <description>Dear VMS Users, &lt;BR /&gt;&lt;BR /&gt;I come across the following compilation when compiling string.cpp, which is enclosed. My guess is that I miss defining a macro so that I will not use multiple byte string. Could you give your opinion?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;YE LIU&lt;BR /&gt;&lt;BR /&gt;CXX /DEFINE=(USE_MULTINET,_DECC_V4_SOURCE,__DECC)/show=include/list /USING_STD /UNDEF=(_MBSTATE_T) string.cpp&lt;BR /&gt;&lt;BR /&gt;    typedef mbstate_t                state_type;&lt;BR /&gt;............^&lt;BR /&gt;%CXX-E-UNDECLARED, identifier "mbstate_t" is undefined&lt;BR /&gt;at line number 192 in module RW_INTERNAL_TRAITS.H of text library SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;1&lt;BR /&gt;&lt;BR /&gt;    typedef mbstate_t                 state_type;&lt;BR /&gt;............^&lt;BR /&gt;%CXX-E-UNDECLARED, identifier "mbstate_t" is undefined&lt;BR /&gt;at line number 291 in module RW_INTERNAL_TRAITS.H of text library SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;1&lt;BR /&gt;&lt;BR /&gt;    typedef mbstate_t                 state_type;&lt;BR /&gt;............^&lt;BR /&gt;%CXX-E-UNDECLARED, identifier "mbstate_t" is undefined&lt;BR /&gt;at line number 387 in module RW_INTERNAL_TRAITS.H of text library SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;1&lt;BR /&gt;&lt;BR /&gt;        return wmemcmp (__s1, __s2, __n);&lt;BR /&gt;...............^&lt;BR /&gt;%CXX-E-UNDECLARED, identifier "wmemcmp" is undefined&lt;BR /&gt;at line number 409 in module RW_INTERNAL_TRAITS.H of text library SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;1&lt;BR /&gt;&lt;BR /&gt;        return _RWSTD_STATIC_CAST (const char_type*,&lt;BR /&gt;...............^&lt;BR /&gt;%CXX-E-UNDECLARED, identifier "wmemchr" is undefined&lt;BR /&gt;at line number 437 in module RW_INTERNAL_TRAITS.H of text library SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;1&lt;BR /&gt;&lt;BR /&gt;        wmemmove (__s1, __s2, __n);&lt;BR /&gt;........^&lt;BR /&gt;%CXX-E-UNDECLARED, identifier "wmemmove" is undefined&lt;BR /&gt;at line number 455 in module RW_INTERNAL_TRAITS.H of text library SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;1&lt;BR /&gt;&lt;BR /&gt;        wmemset (__s, __a, __n);&lt;BR /&gt;........^&lt;BR /&gt;%CXX-E-UNDECLARED, identifier "wmemset" is undefined&lt;BR /&gt;at line number 472 in module RW_INTERNAL_TRAITS.H of text library SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;1&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Oct 2008 14:01:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287473#M44709</guid>
      <dc:creator>YE LIU_1</dc:creator>
      <dc:date>2008-10-15T14:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287474#M44710</link>
      <description>It appears the requisite inclusion of &lt;WCHAR.H&gt; needed for the wmemset call and other functions was omitted from the compilation unit.&lt;/WCHAR.H&gt;</description>
      <pubDate>Wed, 15 Oct 2008 15:10:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287474#M44710</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-10-15T15:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287475#M44711</link>
      <description>Did you look at the source code before you replied?&lt;BR /&gt;&lt;BR /&gt;YE LIU</description>
      <pubDate>Wed, 15 Oct 2008 15:19:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287475#M44711</guid>
      <dc:creator>YE LIU_1</dc:creator>
      <dc:date>2008-10-15T15:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287476#M44712</link>
      <description>&lt;BR /&gt;you're including cwchar, not cwchar.h&lt;BR /&gt;&lt;BR /&gt;does that matter?&lt;BR /&gt;&lt;BR /&gt;does the order you reference matter?&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Oct 2008 15:34:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287476#M44712</guid>
      <dc:creator>Gregg Parmentier</dc:creator>
      <dc:date>2008-10-15T15:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287477#M44713</link>
      <description>That is what I want to find out. BTW, I include wchar.h and it still does not work.&lt;BR /&gt;&lt;BR /&gt;YE LIU</description>
      <pubDate>Wed, 15 Oct 2008 15:47:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287477#M44713</guid>
      <dc:creator>YE LIU_1</dc:creator>
      <dc:date>2008-10-15T15:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287478#M44714</link>
      <description>As it turns out, I did compile the wrong file; and I had another random CXX laying around that built cleanly.  Time to clean up the ITRC scratch area, apparently.&lt;BR /&gt;&lt;BR /&gt;But having sorted that boo-boo out, the code gets the following build error:&lt;BR /&gt;&lt;BR /&gt;$ cxx x&lt;BR /&gt;&lt;BR /&gt;#include "SocketMisc.h"&lt;BR /&gt;.......................^&lt;BR /&gt;%CXX-E-SRCFILNOOPEN, could not open source file "SocketMisc.h"&lt;BR /&gt;at line number 39 in file ...X.CXX;20&lt;BR /&gt;&lt;BR /&gt;That header file was missing from the test build, and the test box doesn't use Multinet.  Either of these could send the compilation off the rails.   (And I don't see the header file with the inclusion.)&lt;BR /&gt;&lt;BR /&gt;The code wasn't compiled with V4 (that's very old), and the compilation didn't disable the _MBSTATE_T, and  didn't select Multinet as none of those appeared (directly) in the source code.   No Multinet here, too.  Interestingly, the code itself doesn't actually check the Multinet settings before it loads a pile of Multinet includes; it's surprised the compilation pass didn't flag those, too.&lt;BR /&gt;&lt;BR /&gt;It wouldn't surprise me that the wchar stuff isn't compatible with the V4-vintage C code, either.&lt;BR /&gt;&lt;BR /&gt;What compiler version, and what platform?  &lt;BR /&gt;&lt;BR /&gt;Got a more complete example or that header file? &lt;BR /&gt;</description>
      <pubDate>Wed, 15 Oct 2008 15:51:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287478#M44714</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-10-15T15:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287479#M44715</link>
      <description>You can remove that line.&lt;BR /&gt;&lt;BR /&gt;YE LIU</description>
      <pubDate>Wed, 15 Oct 2008 15:53:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287479#M44715</guid>
      <dc:creator>YE LIU_1</dc:creator>
      <dc:date>2008-10-15T15:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287480#M44716</link>
      <description>There doesn't seem to be a reason for the Multinet stuff, so I removed it.   After removing various header files and some pieces, the (unmodified) code builds cleanly.&lt;BR /&gt;&lt;BR /&gt;Here's the prolog code...&lt;BR /&gt;&lt;BR /&gt;#include  &lt;STARLET.H&gt;&lt;BR /&gt;#include  &lt;DESCRIP.H&gt;&lt;BR /&gt;#include  &lt;SSDEF.H&gt;&lt;BR /&gt;#include  &lt;STRING.H&gt;&lt;BR /&gt;#include  &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include  &lt;IODEF.H&gt;&lt;BR /&gt;#include &lt;WCHAR.H&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;CWCHAR&gt;&lt;BR /&gt;&lt;BR /&gt; #ifndef _RWSTD_HEADER_REQUIRES_HPP&lt;BR /&gt; #include &lt;STRING&gt;&lt;BR /&gt; #else&lt;BR /&gt; #include &lt;STRING.HPP&gt;&lt;BR /&gt; #endif&lt;BR /&gt;&lt;BR /&gt; #ifdef __USE_STD_IOSTREAM&lt;BR /&gt; #include &lt;IOSTREAM&gt;&lt;BR /&gt; #else&lt;BR /&gt; #include &lt;IOSTREAM.H&gt;&lt;BR /&gt; #endif&lt;BR /&gt;#include  &lt;STARLET.H&gt;&lt;BR /&gt;#include  &lt;DESCRIP.H&gt;&lt;BR /&gt;#include  &lt;SSDEF.H&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;PTHREAD.H&gt;&lt;BR /&gt;&lt;BR /&gt; int main ()&lt;BR /&gt; {&lt;BR /&gt;{remainder of code unchanged}&lt;BR /&gt;&lt;BR /&gt;&lt;/PTHREAD.H&gt;&lt;/SSDEF.H&gt;&lt;/DESCRIP.H&gt;&lt;/STARLET.H&gt;&lt;/IOSTREAM.H&gt;&lt;/IOSTREAM&gt;&lt;/STRING.HPP&gt;&lt;/STRING&gt;&lt;/CWCHAR&gt;&lt;/WCHAR.H&gt;&lt;/IODEF.H&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;&lt;/STRING.H&gt;&lt;/SSDEF.H&gt;&lt;/DESCRIP.H&gt;&lt;/STARLET.H&gt;</description>
      <pubDate>Wed, 15 Oct 2008 15:58:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287480#M44716</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-10-15T15:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287481#M44717</link>
      <description>I used this command to compile:&lt;BR /&gt;&lt;BR /&gt;CXX /DEFINE=(_DECC_V4_SOURCE,__DECC)/show=include/list /USING_STD string.cpp&lt;BR /&gt;&lt;BR /&gt;when I removed _DECC_V4_SOURCE, it works.&lt;BR /&gt;&lt;BR /&gt;YE LIU</description>
      <pubDate>Wed, 15 Oct 2008 16:04:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287481#M44717</guid>
      <dc:creator>YE LIU_1</dc:creator>
      <dc:date>2008-10-15T16:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287482#M44718</link>
      <description>So this appears to involve what is effectively lying to the compiler -- this isn't really V4-vintage source code -- and that got caught out.  &lt;BR /&gt;&lt;BR /&gt;Or in your more succinct description, that "doesn't work".&lt;BR /&gt;&lt;BR /&gt;Is there a particular reason for the (sorry!) somewhat scatter-shot source code here (is this a cut-down example from something larger?) or for (in general) the use of the V4 compiler knob here?&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Oct 2008 16:16:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287482#M44718</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-10-15T16:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287483#M44719</link>
      <description>Hi, Hoff&lt;BR /&gt;&lt;BR /&gt;It works means it compiles and yes I cut and pasted the head files from my project to the example C++ programs provided by VMS. I need define _DECC_V4_SOURCE in order to use multinet and I still have the same problem.&lt;BR /&gt;&lt;BR /&gt;YE LIU</description>
      <pubDate>Wed, 15 Oct 2008 16:25:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287483#M44719</guid>
      <dc:creator>YE LIU_1</dc:creator>
      <dc:date>2008-10-15T16:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: compilation error</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287484#M44720</link>
      <description>Seems you're left with a choice: upgrade the C++ code to a more current instantiation of the compiler, or rework the C++ code for source compatibility with the V4 compiler instantiation (these being the two overt resolutions of the "don't lie to the C++ compiler" maxim) or split the compilation into multiple modules.&lt;BR /&gt;&lt;BR /&gt;As a general rule, staying on old versions of software or hardware isn't a viable long-term strategy.  It works for a while, though you eventually do get to pay to upgrade or to port or to fix the issues that inevitably crop up.  And in any case, these messes and these choices tend to get punted up to management for a decision.&lt;BR /&gt;&lt;BR /&gt;As (another) general rule, it's been my experience that these cases can sometimes be the result of some simple error that somebody used the compatibility setting to paper over; it might well be feasible to move forward by fixing a few bugs that more recent compilers have noticed.  That the use of the old compatibility can be a legacy of a long-forgotten quick fix.  I've also worked various cases where the compiler knobs were inexplicably set to suppress actual and real source code errors; the continued use of /STANDARD=VAXC being a salient example of this with the C compiler.&lt;BR /&gt;&lt;BR /&gt;The best choice here depends on the project goals and budget and timeframe.&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Oct 2008 16:55:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/compilation-error/m-p/4287484#M44720</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-10-15T16:55:30Z</dc:date>
    </item>
  </channel>
</rss>

