`
zs0723
  • 浏览: 19342 次
  • 性别: Icon_minigender_1
  • 来自: 成都
最近访客 更多访客>>
社区版块
存档分类
最新评论

在HP-UX上使用Rogue Wave 库

阅读更多

目的: 调用RogueWave 的RWWString::hash 方法。

源码:

#include <iostream.h>
#include <rw/tools/wstring.h>
#include <string>

const int GUI_INSTANCE_LEN= 11;
void OSS(string input)
{
  RWWString instance(input.c_str(),RWWString::ascii);
  unsigned hashValue = instance.hash();
  char buf[GUI_INSTANCE_LEN];
  snprintf(buf,GUI_INSTANCE_LEN,(char*)"%X",hashValue);

  cout<<"rw string :"<<buf<<endl;

}
int main()
{
   string input;
   cout<<"begin"<<endl;
   while(cin>>input)
   {
   cout<<"you entere:"<<input<<endl<<endl;
   cout<<"*****************************"<<endl;
   cout<<"use  Rogue Wave library:"<<endl;
   OSS(input);
   }
   cout<<"exit";

  }

 

编译选项:

aCC  -o xyz -v -D_RWCONFIG=12d -DRW_THR_OS_VERSION_HPUX=0x1111 -I/opt/nokiaoss/pf3party_c/pf3rwt -lnsl -L/opt/nokiaoss/pf3party_c/pf3rwt/lib -lstreams1312d -ltls7712d
 -ltrace2312d -lfactory1312d -lfunctor2312d -lfunctor_list2312d -lfunctor_map2312d -litc2312d -lpointer2312d -lserial1312d -lsync2312d -lthread2312d -lthrexcept2312d -ltypes1312d  -AA   test.C

 遇到的问题:

(1) Include file <iosfwd> not found

 

       缺少  -AA 参数

 (2) -D_RWCONFIG

 (3)

/usr/ccs/bin/ld: Unsatisfied symbols

  RWWString::initChars(const char *,unsigned long) (first referenced in test.o) (code)
   RWWString::hash(RWWString::caseCompare) const (first referenced in test.o) (code)

   

   缺少-ltls7712d

   

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics