首页 文章

Visual Studio LNK2019中的链接对象文件[关闭]

提问于
浏览
-1

现在我正在尝试在我的visual studio项目中使用目标文件的功能 . 目标文件是在Visual Studio项目之外进行本机编译和生成的,现在最终目标是在我的.cpp文件中调用它的函数 . 在这种情况下,目标文件名为test.obj . 如果我尝试包含它,我会收到以下链接器错误

Fehler LNK2019 Verweis aufnichtaufgelöstesexternes符号“”public:__ cdecl std :: _ Lockit :: _ Lockit(int)“(?? 0_Lockit @std @@ QEAA @ H @ Z)”在Funktion“”类std :: ctype const &__cdecl std :: use_facet>(class std :: locale const&)“(?? $ use_facet @ V?$ ctype @ D @ std @@@ std @@ YAAEBV?$ ctype @ D @ 0 @ AEBVlocale @ 0 @ @Z)” . FlexDll C:\ Users \ ldeppler \ Desktop \ FLEXDLLNEW \ FlexDll \ test.obj

我得到了大约40个这样的错误

Fehler LNK2019 Verweis aufnichtaufgelöstesexternesFunktion中的符号“_Getctype”“”public:struct _Ctypevec __cdecl std :: _ Locinfo :: _ Getctype(void)const“(?_Getctype @ _Locinfo @std @@ QEBA?AU_Ctypevec @@ XZ)” . FlexDll C:\ Users \ ldeppler \ Desktop \ FLEXDLLNEW \ FlexDll \ test.obj

我的目标文件由此命令编译:

cl / EHsc / c / MT / I. TEST.CPP

1 回答

  • 0

    很多事情都可能导致LNK2019 error .

    但很可能在当前项目中,不存在适当的函数声明或者拼写不正确 .

    您可以通过包含用于创建目标文件的头文件或在使用函数的cpp文件的开头粘贴它们来获得相应的函数声明 .

相关问题