5 Replies Latest reply on May 7, 2004 9:08 PM by 807575

    Roguewave errors with rwtools7_std option

    807575
      Hi

      I am trying to use Roguewave tools with Sunone Studio 8 compiler and the flag rwtools7_std but I get the following errors. Any info on this will be appreciated.

      Regards
      Balaji
      -------------------------------

      Compiler: Sunone Studio 8.
      Command Used to Compile: CC -library=rwtools7_std stream.cpp
      OS: Solaris 8

      stream.cpp
      ========

      #include <rw/cstring.h>
      #include <rw/tvhdict.h>

      int main()
      {

      RWTValHashDictionary<RWCString, unsigned int> gdmoNameHash(RWCString::hash);


      }
      ==========================================================
      Errors

      "stream.cpp", line 7: Error: Too few arguments for template RWTValHashMap.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 64: Error: The base "RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>" must be a previously defined class or struct.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 99: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 99: Error: apply is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 100: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 100: Error: applyToKeyAndValue is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 101: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 101: Error: begin is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 102: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 102: Error: end is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 103: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 103: Error: isEmpty is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 104: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 104: Error: entries is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 105: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 105: Error: operator == is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 106: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 106: Error: operator<is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 108: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 108: Error: clear is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 109: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 109: Error: contains is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 110: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 110: Error: find is not a member of RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      "/opt/external/studio8/SUNWspro/prod/include/CC/rw7/rw/tvhdict.h", line 111: Error: RW_VMapAssoc<rw_hashmap<RWCString, T, H, EQ, std::allocator<RWCString>>, RWTValHashMap<RWCString, T, H, EQ>, RWCString, T> is not a base class of RWTValHashMap<RWCString>.
      "stream.cpp", line 7: Where: While specializing "RWTValHashMap<RWCString>".
      "stream.cpp", line 7: Where: Specialized in non-template code.
      Compilation aborted, too many Error messages.
        • 1. Re: Roguewave errors with rwtools7_std option
          807575
          The standard library version of rwtools has some different template definitions, as documented, providing STL extensions. In particular, class RWTValHashDictionary has a different definition with
          STL extensions.

          With library=rwtools7
          #define RWTValHashDictionary RWTValHashMap

          With library=rwtools7_std
          template <class K, class V> class RWTValHashDictionary

          Hence, the complaint about template parameters.
          • 2. Re: Roguewave errors with rwtools7_std option
            807575
            Thanks. I figured that part too, by looking at the header file. Does it mean that I can't use
            RWTValHashDictionary with the library=rwtools7_std option ?
            • 3. Re: Roguewave errors with rwtools7_std option
              807575
              Actually, the situation is the other way around. :-)

              Without the standard library, when you ask for RWTValHashDictionary you get RWTValHashMap instead.
              You get RWTValHashDictionary only with with the standard C++ library.

              The definition and interfaces of the two classes are different, so the same source code won't work with both. You should use RWTValHashMap if you need to work with both classic iostreams and with the standard library. If you plan to use only the standard library, you can use RWTValHashDictionary, but you need to modify your code.
              • 4. Re: Roguewave errors with rwtools7_std option
                807575
                I am confused now !. If RWTValHashDictionary will work with the standard library, then what is the problem with the following piece of code ? It doesn't compile with the -library=rwtools7_std option

                #include <rw/cstring.h>
                #include <rw/tvhdict.h>

                int main()
                {

                RWTValHashDictionary<RWCString, unsigned int> gdmoNameHash(RWCString::hash);

                }
                • 5. Re: Roguewave errors with rwtools7_std option
                  807575
                  Sorry, I got it backwards. I should have checked more carefully first.

                  Using -library=rwtools7,iostream option, rwtools supplies the template class RWTValHashDictionary, which has two template arguments.

                  Using -library=rwtools7_std, rwtools converts every mention of RWTValHashDictionary into RWTValHashMap. The RWTValHashMap template requries 4 parameters., so you cannot invoke it the same way you invoke RWTValHashDictionary.

                  You have to decide which way you want to compile the code, and modify the source code appropriately.