开发者

Linker Error causing problems

/home/crbt/AUT/SVN/version1.1/Code/poly6.3/linux/i386/gcc/lib/libpat.a(polymem.o): In function `poly_memory_init':
    polymem.cxx:(.text+0x71): undefined reference to `FastNew(unsigned int)'
    polymem.cxx:(.text+0x76): undefined reference to `FastDelete(void*)'
    polymem.cxx:(.text+0x81): undefined开发者_开发百科 reference to `init_new_and_delete(void* (*)(unsigned int), void (*)(void*))'
    polymem.cxx:(.text+0xab): undefined reference to `MemoryHandler::Create(MemoryHandlerInitStruct*)'
    polymem.cxx:(.text+0xbe): undefined reference to `WarmNew(unsigned int)'
    polymem.cxx:(.text+0xc3): undefined reference to `WarmDelete(void*)'
    polymem.cxx:(.text+0xcc): undefined reference to `init_new_and_delete(void* (*)(unsigned int), void (*)(void*))'

I fail to understand the reason behind the linker errors. I navigated to the path mentioned above and found the libpat.a file to be intact.


The error means that the linked modules are missing a definition of the named items FastNew(unsigned int), etc. That is, some code references the item, but there is no implementation of it.

This could have several classes of cause:

  • a library is missing from the link
  • a module is compiled incorrectly: mismatched options, #defines, or C vs. C++
  • a module is mistakenly linked which should not have been

From the types of modules referenced, I think the cause is likely the first one. Look for a memory management library which should be included.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜