请教大家这个是什么意思啊?请大家指教CppTest.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CppDyer

besthyq 2005-02-28 08:50:01
初次用VC++6.0,编译通过了,可是link的时候出现了这个问题
------------------Configuration: CppTest - Win32 Debug--------------------
Linking...
CppTest.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CppDyer::~CppDyer(void)" (??1CppDyer@@UAE@XZ)
CppTest.obj : error LNK2001: unresolved external symbol "public: void __thiscall CppDyer::processFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?processFile@CppDyer@@QAEXV?$basic_string@DU?$char_trait
s@D@std@@V?$allocator@D@2@@std@@@Z)
CppTest.obj : error LNK2001: unresolved external symbol "public: __thiscall CppDyer::CppDyer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0CppDyer@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocat
or@D@2@@std@@@Z)
Debug/CppTest.exe : fatal error LNK1120: 3 unresolved externals
执行 link.exe 时出错.

CppTest.exe - 1 error(s), 0 warning(s)
请大家指教~~。
...全文
279 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jinhao 2005-03-01
  • 打赏
  • 举报
回复
CppDyer,如果这东西有 source cpp file,那么就把这些文件添加到你的工程中
nonowhy 2005-02-28
  • 打赏
  • 举报
回复
添加静态库:
project-->setting-->link-->object/model
besthyq 2005-02-28
  • 打赏
  • 举报
回复
是库文件没找到吗?

顺便问下,要怎样在VC++里面添加库文件
Kudeet 2005-02-28
  • 打赏
  • 举报
回复
agree 你看看CppDyer是不是有问题,没找到有些需要实现的东西。
nonowhy 2005-02-28
  • 打赏
  • 举报
回复
从错误提示来看,是连接时没有找到类成员的实现...
besthyq 2005-02-28
  • 打赏
  • 举报
回复
#include "stdafx.h"
#include "CppLex.h"
#include "CppDyer.h"
#include <sstream>
#include <fstream>
#include <iostream>

using namespace std;
using namespace CppParser;

class HtmlEncoder
{
int mPositionInLine;
bool mIsInFontTag;
string mLastColor;
public:
HtmlEncoder()
{
cout<<"<FONT FACE=\"Fixedsys\">";
mPositionInLine=0;
mIsInFontTag=false;
}
string encode(const string& s,const std::string& color)
{
std::string r;
if(mLastColor!=color)
{
mLastColor=color;
if(mIsInFontTag)
{
r+="</FONT><FONT COLOR=\"";
r+=color;
r+="\">";
}
else
{
r+="<FONT COLOR=\"";
r+=color;
r+="\">";
}
}
for(std::string::size_type i=0;i<s.size();++i)
{
if(s[i]=='\"')
r+=""";
else if(s[i]=='&')
r+="&";
else if(s[i]=='<')
r+="<";
else if(s[i]=='>')
r+=">";
else if(s[i]==' ')
r+=" ";
else if(s[i]=='\t')
{
for(int i=0;i<4-mPositionInLine%4;++i)
r+=" ";
mPositionInLine+=4-mPositionInLine%4;
continue;
}
else if(s[i]=='\n')
{
r+="<br>";
mPositionInLine=0;
continue;
}
else
r+=s[i];
++mPositionInLine;
}
return r;
}
string flush()
{
if(mIsInFontTag)
return "</FONT>";
cout<<"</FONT>";
}
};

int main(int argc, char* argv[])
{
cerr<<"CppDyer 0.99 (c) by PolyRandom, all right reserved"<<endl;
cerr<<"This version is for debug only, please check"<<endl;
cerr<<"http://www.polyrandom.com/"<<endl;
cerr<<"for bug report and latest versions"<<endl;
cerr<<endl;
if(argc!=3)
{
cerr<<"USAGE: CppDyer <ini file name> <cpp file name>"<<endl;
return 0;
}
cerr<<"Converting..."<<endl;
try
{
CppDyer cd(argv[1]);
cd.processFile(argv[2]);
cerr<<"done"<<endl;
}
catch(...)
{
cerr<<"failed"<<endl;
}
return 0;
}
主程序是这个。。。请大家指教一下吧

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧