从IBM VisualAge C ++ 3.6.5迁移到VS 2010

时间:2012-11-19 08:20:39

标签: c++ visual-studio-2010 visual-age

我们正在将32位C ++应用程序迁移到64位应用程序(VS 2010)。此应用程序是在10年前使用IBM VisualAge C ++ 3.6.5 for Windows开发的。由于IBM已停止支持此编译器,因此我们在将其迁移到VS 2010时遇到了问题。

这主要是因为缺少一些库。

示例错误:

  

错误LNK2019:函数“int __cdecl allocate_heap_storage_(void)”中引用了未解析的外部符号__uopen(?allocate_heap_storage @@ YAHXZ)   错误LNK2019:函数“int __cdecl allocate_heap_storage_(void)”中引用的未解析外部符号__ucreate(?allocate_heap_storage @@ YAHXZ)   错误LNK2019:函数“int __cdecl deallocate_heap_storage_(void)”中引用的未解析的外部符号__udestory(?deallocate_heap_storage @@ YAHXXZ)   错误LNK2019:函数“int __cdecl deallocate_heap_storage_(void)”中引用的未解析的外部符号__uclose(?deallocate_heap_storage @@ YAHXXZ)   错误LNK2019:函数“int __cdecl alloc_share_mem_(int,int)”中引用了未解析的外部符号__umalloc(?alloc_share_mem @ YAPAXHH @ Z)

上述函数在umalloc.h中定义,但我们缺少定义。

我们如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

对于上面的错误,链接时找不到这些函数“_ ucreate”, _udestory,_ uclose, _umalloc“,我认为这些函数都在运行Visual Age提供的时间库。如果你能找到这些运行时库的lib文件,你可以将它们放在链接的输入中,它可以通过编译阶段,但可能无法启动。

这里的一个建议是用windows函数替换上面的函数。上述所有函数都与内存分配有关。