草庐IT

c++ - 如何解决错误 LNK2019

我正在用C++发送一封简单的电子邮件。我从下面的链接下载了一个示例C++程序。http://cboard.cprogramming.com/cplusplus-programming/125655-sending-simple-email-cplusplus.html示例程序在编译时似乎遇到了以下错误。请帮我解决问题。Error8errorLNK2019:unresolvedexternalsymbol_send_mailreferencedinfunction_wmainError9errorLNK2019:unresolvedexternalsymbol__imp__recv@16

c++ - 由于 "Error LNK2028: unresolved token...",我无法编译解决方案

我有一个用C++编写的dll和一个用VisualC++编写的exe。我将dll中的函数声明为:string__declspec(dllexport)ConfigureHAT(T_STRINGpathFile);在exe项目中,我包含了所有的头文件和dll文件。我调用dll中的函数:stringret=ConfigureHAT("file.txt");当编译可执行项目时,它失败并出现以下错误:1>HATdllTester.obj:errorLNK2028:unresolvedtoken(0A000317)"classstd::basic_string,classstd::allocato

c++ - LNK2001:我的 boost 库(可能)构建不正确

我决定将我的boost库从1.61更新到1.63,在我更新为使用新文件的项目中,我收到了一些以前没有收到的新错误消息:errorLNK2001:unresolvedexternalsymbol"classboost::system::error_categoryconst&__cdeclboost::system::system_category(void)"(?system_category@system@boost@@YAAEBVerror_category@12@XZ)errorLNK2001:unresolvedexternalsymbol"classboost::system

c++ - CMake 链接以 boost 。错误 LNK2005

一整天都在四处寻找解决方案,但并不高兴。我有一个包含2个项目的CMake解决方案。一个是链接到boost的静态库,另一个是链接到boost和我自己的静态库的可执行文件。问题是:在Linux中,它用gcc编译得很好。但在VS2008中,我仅针对program_options收到以下类型的链接器错误。libboost_program_options-vc90-mt-gd-1_46_1.lib(options_description.obj):errorLNK2005:"public:classboost::program_options::options_description_easy_

派生类中构造函数和析构函数的 C++ LNK2019 错误

我有两个类,一个继承自另一个。编译时出现以下错误:Entity.obj:errorLNK2019:unresolvedexternalsymbol"public:__thiscallUtility::Parsables::Base::Base(void)"(??0Base@Parsables@Utility@@QAE@XZ)referencedinfunction"public:__thiscallUtility::Parsables::Entity::Entity(void)"(??0Entity@Parsables@Utility@@QAE@XZ)Entity.obj:errorL

c++ - GLFW 的 VC++ LNK 错误

我正在使用VC++2010来处理一些OpenGL。然而,它正在成为一种痛苦。我不断收到错误代码。这是我正在使用的代码://Includestandardheaders#include#include//IncludeGLEW#include//IncludeGLFW#include//IncludeGLM#includeusingnamespaceglm;intmain(void){//InitialiseGLFWif(!glfwInit()){fprintf(stderr,"FailedtoinitializeGLFW\n");return-1;}glfwOpenWindowHint

c++ - Visual Studio 2010 中 Visual C++ 中的 LNK 2005

我正在尝试在MSVS2010中编译使用VisualC++2005和MFC编写的C++程序。遗憾的是,我在编译期间遇到以下错误:Error2errorLNK2005:"public:virtual__thiscallCMemDC::~CMemDC(void)"(??1CMemDC@@UAE@XZ)alreadydefinedinCMemDCImpl.objProject\Project\Project\uafxcwd.lib(afxglobals.obj)Project.CMemDCImpl有一个头文件,其中包含类CMemDCImpl的所有成员的定义,以及*.cpp文件及其实现。请帮我解

c++ - 链接器错误 LNK2001

当我尝试创建对象时,我在VisualStudio中收到LNK2001错误,我认为这是构造函数的问题,因为更改构造函数会更改错误。Customerbob("Bob","25BobLane","01bob82","M","bob/bob/bob");这一行给出了这个错误:Error1errorLNK2001:unresolvedexternalsymbol"public:__thiscallCustomer::Customer(classstd::basic_string,classstd::allocator>,classstd::basic_string,classstd::alloc

c++ - 全局 const char* 上的错误 LNK1169

我在使用VisualStudio2010和C++时遇到了一些奇怪的行为。我有一个头文件,我在其中声明了一些全局常量#ifndefCONSTANTS_H#defineCONSTANTS_H#defineWIN32_LEAN_AND_MEAN//Macros...#defineSAFE_RELEASE(ptr){if(ptr){ptr->Release();ptr=NULL}}#defineSAFE_DELETE(ptr){if(ptr){deleteptr;ptr=NULL;}}//Constants...constchar*CLASS_NAME="WinMain";constcharG

C++ LNK1120 和 LNK2019 错误 : "unresolved external symbol WinMain@16"

我正在尝试做Deitel书中的另一个练习。该程序计算每个储户的每月利息并打印新余额。由于练习是与动态内存相关的章节的一部分,因此我使用“新建”和“删除”运算符。出于某种原因,我得到了这两个错误:LNK2019:unresolvedexternalsymbolWinMain@16referencedinfunction___tmainCRTStartupfatalerrorLNK1120:1unresolvedexternals这是类的头文件。//SavingsAccount.h//HeaderfileforclassSavingsAccountclassSavingsAccount{p