久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

目標文件中未解析的外部符號

Unresolved external symbol in object files(目標文件中未解析的外部符號)
本文介紹了目標文件中未解析的外部符號的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

在 Visual Studio 中編碼期間,我遇到了一個未解決的外部符號錯誤我不知道該怎么辦.我不知道怎么了.你能解密我嗎?我應該在哪里尋找什么樣的錯誤?

During coding in Visual Studio I got an unresolved external symbol error and I've got no idea what to do. I don't know what's wrong. Could you please decipher me? Where should I be looking for what kind of errors?

1>Form.obj : error LNK2019: unresolved external symbol "public: class Field * __thiscall Field::addField(class Field *)" (?addField@Field@@QAEPAV1@PAV1@@Z) referenced in function "public: void __thiscall Form::parse(class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?parse@Form@@QAEXAAV?$basic_stringstream@DU?$char_traits@D@V?$allocator@D@@Z)
1>Form.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall Field::parse(class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?parse@Field@@UAEXAAV?$basic_stringstream@DU?$char_traits@D@V?$allocator@D@@Z) referenced in function "public: __thiscall InputField::InputField(class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > &)" (??0InputField@@QAE@AAV?$basic_stringstream@DU?$char_traits@D@V?$allocator@D@@Z)
1>Form.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Field::prompt(void)" (?prompt@Field@@UAEXXZ)
1>Form.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Field::getName(void)" (?getName@Field@@UAE?AV?$basic_string@DU?$char_traits@D@V?$allocator@D@XZ)
1>Form.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Field::getType(void)" (?getType@Field@@UAE?AV?$basic_string@DU?$char_traits@D@V?$allocator@D@XZ)
1>Form.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Field::describe(void)" (?describe@Field@@UAEXXZ)
1>C:Users	omyDocumentsVisual Studio 2010Projectszapoctovkac++Debugzapoctovkac++.exe : fatal error LNK1120: 6 unresolved externals

推薦答案

這個錯誤通常意味著某些函數有聲明,但沒有定義.

This error often means that some function has a declaration, but not a definition.

示例:

// A.hpp
class A
{
public:
  void myFunc(); // Function declaration
};

// A.cpp

// Function definition
void A::myFunc()
{
  // do stuff
}

在您的情況下,無法找到定義.問題可能是您包含了一個頭文件,它引入了一些函數聲明,但您要么:

In your case, the definition cannot be found. The issue could be that you are including a header file, which brings in some function declarations, but you either:

  1. 不要在您的 cpp 文件中定義函數(如果您自己編寫此代碼)
  2. 不要包含包含定義的 lib/dll 文件

一個常見的錯誤是你將一個函數定義為一個獨立的函數而忘記了類選擇器,例如A::,在你的 .cpp 文件中:

A common mistake is that you define a function as a standalone and forget the class selector, e.g. A::, in your .cpp file:

錯誤: void myFunc() {/* do stuff *

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How do I set the icon for my application in visual studio 2008?(如何在 Visual Studio 2008 中為我的應用程序設置圖標?)
Convert CString to const char*(將 CString 轉換為 const char*)
Remove secure warnings (_CRT_SECURE_NO_WARNINGS) from projects by default in Visual Studio(默認情況下,在 Visual Studio 中從項目中刪除安全警告 (_CRT_SECURE_NO_WARNINGS))
How do I start a new CUDA project in Visual Studio 2008?(如何在 Visual Studio 2008 中啟動新的 CUDA 項目?)
Exporting classes containing `std::` objects (vector, map etc.) from a DLL(從 DLL 導出包含 `std::` 對象(向量、映射等)的類)
What are some reasons a Release build would run differently than a Debug build(發布版本與調試版本的運行方式不同的一些原因是什么)
主站蜘蛛池模板: 一级欧美一级日韩片 | 国产91精品久久久久久久网曝门 | 91大片| 中文在线一区二区 | 男女精品久久 | 91文字幕巨乱亚洲香蕉 | 91久久久久久 | 精品日韩一区二区 | 欧美日韩一 | 久久精品亚洲欧美日韩久久 | 黄色成人国产 | 丁香婷婷久久久综合精品国产 | 成人一级片在线观看 | www.日韩| 亚洲午夜网 | 欧美精品久久 | 久久国产精品-久久精品 | 国产成人综合在线 | 婷婷激情综合 | 成人免费视频网站在线看 | 91精品国产色综合久久 | www.亚洲视频 | 九色 在线 | 作爱视频免费观看 | 中文字幕11页 | 久久久久久久久久久国产 | 欧美亚洲网站 | 一区二区三区精品在线视频 | 成人九色 | 超碰97av | 亚洲国产中文字幕 | 中文字幕一区在线观看视频 | 国产网站在线免费观看 | 欧美成人一区二区 | 久久婷婷色 | 国产精品自拍视频网站 | av日韩在线播放 | 日本在线免费 | 一区二区三区视频 | 久久成人18免费网站 | 伊人久久麻豆 |