简体   繁体   English

问题编译Eliza chatbot C ++错误LNK2019

[英]Problem compiling Eliza chatbot C++ error LNK2019

firstly I would just like to say that I am not a C++ programmer and I never intend to be - I am an SQL, javascript and PHP developer. 首先,我只想说,我不是一个C ++程序员,我从来没有打算是 - 我是一个SQL,JavaScript和PHP开发人员。 For a module at Univeristy I have to alter a chatbot project to demonstrate AI and NLP. 对于在大学一个模块,我需要改变一个聊天机器人项目展示AI和NLP。

While my own exasperation (at being handed an assignment that requires a background knowledge in a subject matter that I have never been taight in my 3 years here) is irrelevant, I am attempting to dive in and learn a bit of C++, as computer logic is, I hope, universal across languages. 尽管我自己的不满(在完成任务时需要我在这里三年没有接触过的主题方面的背景知识)是无关紧要的,但由于计算机逻辑,我正尝试深入学习C ++是的,我希望,跨语言的普遍性。 My point is that I am not knowledgeable in this, and I apologise for that. 我的观点是我对此并不了解,对此我深表歉意。 I have honestly searched for this error (there is a lot) but I don't understand some of the solutions. 我已经诚实地搜索了此错误(有很多错误),但我不了解某些解决方案。

Anyway, I am getting these errors when I compile: 无论如何,我在编译时遇到以下错误:

1>Eliza.obj : error LNK2019: unresolved external symbol "public: void __thiscall Lex::load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?load@Lex@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main

1>Eliza.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Lex::partOfSpeech(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?partOfSpeech@Lex@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V23@@Z) referenced in function "void __cdecl showLexValues(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?showLexValues@@YAXAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z)

1>Eliza.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Lex::meaning(void)" (?meaning@Lex@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "void __cdecl showLexValues(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?showLexValues@@YAXAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z)

1>Eliza.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Lex::contains(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?contains@Lex@@QAE_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "void __cdecl showLexValues(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?showLexValues@@YAXAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z)

1>C:\Users\Minky\Documents\chatbot\Eliza4\Debug\elizav4.exe : fatal error LNK1120: 4 unresolved externals

I have tried changing the subsystem, as I read - this did not work. 我试图改变子系统,因为我读 - 这并不工作。 I have tried looking for the things that I am supposed to link, but I don't know how. 我试图寻找那我应该联系起来的东西,但我不知道怎么办。 I have a new installation of Visual Studio 2005. 我有一个新安装的Visual Studio 2005。

Can anyone help me please? 谁能帮我吗? I really would like to start making headway on this immediately. 我真的很想立即在这方面取得进展。 Here is the project file http://www.mediafire.com/?3xvnb37449i65x9 下面是该项目的文件http://www.mediafire.com/?3xvnb37449i65x9

This code should work straight out the box, so to speak, as it is the project files that you are supposed to start with and subsequently add to. 此代码应直接开箱,可以这么说,因为这是你应该开始,然后添加到项目中的文件。

With that in mind, do you think there is a problem with my configuration? 考虑到这一点,你觉得有一个与我的配置有问题? Are the project files supposed to go somewhere specific so that VS can find and reference libraries or something (I'm clutching at straws here)? 应该在项目文件去的地方详细,以便VS可以找到并参考图书馆或某事(我的救命稻草这里)? As I said, I had found a thread talking about subsystems, which I tried changing, with no joy 正如我所说的,我发现了一个线程谈论子系统,我试图改变,没有快乐

I really really need to get crackin on this - again I want to point out I am not trying to learn C++, this project is a tool to demonstrate NLP. 我真的非常需要对此进行破解-我想再次指出,我并不是在学习C ++,该项目是演示NLP的工具。 So while I realise that there is a reluctance with people to just give people an answer, I am merely trying to get this working so I can get started. 所以,当我意识到有与人不愿就这样给人们一个答案,我只是试图让这个工作,所以我可以上手。 I really have searched and yes there are a lot of similiar threads, but I have literally no knowledge of C++ at all, so it is just completely unhelpful to me. 我确实进行了搜索,是的,有很多类似的线程,但是我实际上根本不了解C ++,所以这对我完全没有帮助。 I am certain that this is a problem with my configuration or something 我确定这是我的配置有问题

Any help would be appreciated 任何帮助,将不胜感激

Take a look at this: http://msdn.microsoft.com/en-us/library/799kze2z%28v=vs.80%29.aspx 看一下这个: http : //msdn.microsoft.com/en-us/library/799kze2z%28v=vs.80%29.aspx

That should probably answer your question. 那可能应该回答您的问题。 Also, if you are using any code libraries then these are not being linked to correctly. 另外,如果您使用任何代码库,那么这些库均未正确链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM