链接错误VS 2015

时间:2016-06-17 05:53:03

标签: c++ visual-studio visual-studio-2015 converter

我将一个项目从VS 2008升级到2015年。 在VS 2008中一切都很好但是在最新版本中我有一些编译问题。 ERROR:

Warning LNK4098 defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library UserInterface
Error   LNK2001 unresolved external symbol "public: void __thiscall SpherePack::LostChild(class SpherePack *)" (?LostChild@SpherePack@@QAEXPAV1@@Z) UserInterface   E:\DEV\launcher\UserInterface\eterlib.lib(GrpObjectInstance.obj)

错误中指定的函数不会丢失。

    void SpherePack::LostChild(SpherePack *t)
{
    assert(mChildCount);
    assert(mChildren);

#ifdef _DEBUG  // debug validation code.

    SpherePack *pack = mChildren;
    bool found = false;
    while (pack)
    {
        if (pack == t)
        {
            assert(!found);
            found = true;
        }
        pack = pack->_GetNextSibling();
    }
    assert(found);

#endif

    // first patch old linked list.. his previous now points to his next
    SpherePack *prev = t->_GetPrevSibling();

    if (prev)
    {
        SpherePack *next = t->_GetNextSibling();
        prev->SetNextSibling(next); // my previous now points to my next
        if (next) next->SetPrevSibling(prev);
        // list is patched!
    }
    else
    {
        SpherePack *next = t->_GetNextSibling();
        mChildren = next;
        if (mChildren) mChildren->SetPrevSibling(0);
    }

    mChildCount--;

    if (!mChildCount && HasSpherePackFlag(SPF_SUPERSPHERE))
    {
        mFactory->Remove(this);
    }
}

提前致谢!

0 个答案:

没有答案