Forte Compiler 12 with RougeWave

Hi ,
we are existing moving application from solaris 8 to solaris 10
I am using Rougewave RW_Tools version 10
i have some std::ifstream classes used in the source code
when i compile it give me the fllowing warnings and teh linker does not report any error but fails to install

ld: warning: symbol `RWDlistCollectables::__vtbl' has differing sizes:
(file /xenv/rwsp_tools/X/10.0/32/core1000_12d/lib/libtls8012d.so value=0x98; file /xenv/Forte/X/12.0/5.10u1/lib/rw7/std/librwtool.so value=0x88);
/xenv/rwsp_tools/X/10.0/32/core1000_12d/lib/libtls8012d.so definition taken
ld: warning: symbol `RWCollectableInt::__vtbl' has differing sizes:

in the source code we are using std classes and certainly i can see that there is library conflict .

if i remove RougeWave library libtls8012d.so then i get
int RWCString::compareToSpecial(const char*,unsigned,RWCString::caseCompare)const /BuildDir/ProdBuildDir/acctdist_1261617/hermebld/acctdist_3.7_Q0_TST/lib/libACDist.a(Db.o)
unsigned RWCString::indexSpecial(const char*,unsigned,unsigned,RWCString::caseCompare)const /BuildDir/ProdBuildDir/acctdist_1261617/hermebld/acctdist_3.7_Q0_TST/lib/libACDist.a(Db.o)

if i remove -library=rwtools7_std then i get teh above warnings and teh linker fails without any errors or warnings

please help me with this.



I haven't used Tools.h++ for a while, but my first guess is that you're mixing code built on the new environment with libraries built on the old environment.

I don't think you'll find anything wrong in the code or build.

Clean everything and start again.
Last edited on
I too haven't used them in a long time; however, I do remember upgrading Roguewave and not cleaning everything was the issue.

Also, check the directories for pre-instantiated objects.
Another thing to check: make sure you're getting the RogueWave header files from the same place in all your code.
see the Conflict is between libraries from /xenv/rwsp_tools/X/10.0/32/core1000_12d/lib/libtls8012d.so
versus
libraries from Forte

/xenv/Forte/X/12.0/5.10u1/lib/rw7/std/librwtool.so

so how to remove and which one to remove ?

Try removing the rwsp_tools version from the link line. It sounds like this mihgt be an older version.
ok i removed its compiling without errors but stilll there seems a linker error
for which there is no error message

i have a doubt on the following code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ident  "%W%"

////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//  File:        ACColumnInfo.h                                               //
//                                                                            //
//  Date:        August 3, 1995                                               //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////



#ifndef __AC_COLUMN_INFO_H
#define __AC_COLUMN_INFO_H


#include <stdlib.h>
#include <rw/cstring.h>
#include <rw/tvslist.h>
#incluHealth Craft Kitchen Machine Food Cuttede <rw/tvhdict.h>
#if CPLUSREL >= 6
#include "DefineRW.h"
#endif


// Column structure that is used to store the information of a column
struct Column
{
   RWCString name;
   RWCString type;
   int length;
};


struct str_hash{
   unsigned long operator()(RWCString x) const
   { return x.hash(); }
};
struct StringEqual {
  bool operator()(const RWCString& s, 
                  const RWCString& t) const
      {  return s == t; }
};

// Accounts Column Information Class
class ACColumnInfo
{
   private:
      //static unsigned hashFunction(const RWCString& str);

      // Do not allow to use the copy constructor
      ACColumnInfo(const ACColumnInfo&);
      // Do not allow to use the assignment operator
      ACColumnInfo& operator=(const ACColumnInfo&);
      // dictionary storing all object names and their column lists
#if CPLUSREL >= 6
      RWTValHashMap58<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> *dictionary;
#else
      RWTValHashMap<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> *dictionary;
#endif
      // pointer to the current column list
      RWTValSlist<Column> *column_list_ptr;
      // current column object
      Column column;
      // index of the current column in the column list
      int index;

   public:   
      ACColumnInfo();
      ~ACColumnInfo();
      Column* operator->()
      {
	 return &column;
      };
      int addObject(const RWCString& object_name);
      void addColumn();
      int operator++();
      int count;
      int findObject(const RWCString& object_name);
};


#endif





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#ident  "%W%"


////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//  File:        ACColumnInfo.C                                               //
//                                                                            //
//  Date:        August 3, 1995                                               //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////



#include "obj_handler/ACColumnInfo.h"



// constructor
ACColumnInfo::ACColumnInfo()
{
#if CPLUSREL >= 6
    dictionary = new RWTValHashMap58<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> ();
#else
    dictionary = new RWTValHashMap<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> ();
#endif
	index = -1;
}



// destructor
ACColumnInfo::~ACColumnInfo()
{
   RWTValSlist<Column> *list_ptr;

#if CPLUSREL >= 6
   RWTValHashMapIterator58<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> iterator(*dictionary);
#else
   RWTValHashMapIterator<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> iterator(*dictionary);
#endif
   // iterate through every object
   while (++iterator)
   {
      // delete the column list
      list_ptr = iterator.value();
      list_ptr->clear();
      delete list_ptr;
   }

   // delete the dictionary
   dictionary->clear();
   delete dictionary;
}






// add a new Accounts object to the dictionary
int ACColumnInfo::addObject(const RWCString& object_name)
{
   RWCString tmpstr;
   RWTValSlist<Column> *list_ptr;

   index = -1;
   if (dictionary->find(object_name, tmpstr) == FALSE) 
   {
      list_ptr = new RWTValSlist<Column>;
      column_list_ptr = list_ptr;
      dictionary->insertKeyAndValue(object_name, list_ptr);
      return 0;
   }
   else
      return 1;
}



// add a new column to the column list
void ACColumnInfo::addColumn()
{
   index = -1;
   column_list_ptr->append(column);
}



// advance to the next column in the column list
int ACColumnInfo::operator++()
{
   if (column_list_ptr->isEmpty())
   {
      // the column list is empty
      index = -1;   
   }
   else if (index == -1)
   {
      // point to the first column in the column list
      index = 0;
      column = column_list_ptr->at(index);
   }
   else if (index < (column_list_ptr->entries() - 1))
   {
      // advance to the next column in the column list
      column = column_list_ptr->at(++index);
   }
   else
   {
      // the column list is empty
      index = -1;
   }

   // return with an appropriate return code
   if (index >= 0)
      return 1;
   else
      return 0;
}



// find and use the column list of the Accounts object
int ACColumnInfo::findObject(const RWCString& object_name)
{
   RWTValSlist<Column> *list_ptr;

   if (dictionary->findValue(object_name, list_ptr) == TRUE)
   {
      index = -1;
      column_list_ptr = list_ptr;
      count = list_ptr->entries();
      return 0;
   }
   else
      return 1;
}



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
in DefineRW.h 
i have 


#ident  "%W%"
#if CPLUSREL >= 6

	#if !defined(_RWTValHashMap58_) && (defined(__RWTVHMAP_H__) || defined(RW_TOOLS_TVHMAP_H))
		#define _RWTValHashMap58_	1

		template <class K, class T, class H, class EQ ,class A > class RWTValHashMap58 :
			public RWTValHashMap< K, T,H, EQ,A >
		{
		public:
			RWTValHashMap58() :
				RWTValHashMap< K, T,H,EQ,A>() { }
		};

	#endif
	#if !defined(_RWTValHashSet58_) && (defined(__RWTVHSET_H__) || defined(RW_TOOLS_TVHSET_H))

		#define _RWTValHashSet58_ 				1

		template <class T> class RWTValHashSet58 :
			public RWTValHashSet< T, RWTHasher<T>, RW_SL_STD(equal_to)<T> >
		{
		public:
			RWTValHashSet58(unsigned (*hash)(const T &)) :
				RWTValHashSet< T, RWTHasher<T>, RW_SL_STD(equal_to)<T> >(hash) { }
		};

	#endif




is there anything wrong in declaration and definition which is causing the linker error ?
there seems a linker error for which there is no error message

Can you elaborate on this? What makes you say there is a linker error?

1
2
3
4
int ACColumnInfo::operator++()
{
 ...
      column = column_list_ptr->at(index);

The at(n) method of a list is very inefficient: it has to start at the beginning of the list and walk through it until it finds the n'th element. You might be better off mapping to a vector, unless the number of items in the list is very small.

In fact, it looks like it would be pretty easy to convert this code to use STL collections, if that's an option.
i removed the conflicting libraries the code compiler but does not install the application , this makes me believe that there is a linker error
and there are no linker errors displayed
the only code change i made is the about
i added template declaration
1
2
3
4
5
6
7
template <class K, class T, class H, class EQ ,class A > class RWTValHashMap58 :
			public RWTValHashMap< K, T,H, EQ,A >
		{
		public:
			RWTValHashMap58() :
				RWTValHashMap< K, T,H,EQ,A>() { }
		};

1
2
3
4
5
6
7
then in declaration of ACColumnInfo i changed 

#if CPLUSREL >= 6
      RWTValHashMap58<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> *dictionary;
#else
      RWTValHashMap<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> *dictionary;
#endif 


then in ACColumnInfo

1
2
3
4
5
6
7
8
9

   RWTValSlist<Column> *list_ptr;

#if CPLUSREL >= 6
   RWTValHashMapIterator58<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> iterator(*dictionary);
#else
   RWTValHashMapIterator<RWCString,RWTValSlist<Column> *,str_hash,StringEqual> iterator(*dictionary);
#endif
   // iterate through every object 



so my question is is there any problem in declaration and definition
?
cold it be this which is causing linker error ?
I'd dig through the output of the make process to see if there is an error displayed. There must be some reason why it didn't install the program and there must be an error message there somewhere.
Topic archived. No new replies allowed.