C++ Chatterbot: Fix Linking Errors with Dev C++ 5

  • C/C++
  • Thread starter hermy
  • Start date
  • Tags
    C++
In summary, the conversation is about someone encountering errors while trying to compile code they found online, and seeking help in determining if the issue is with their compiler or the program itself. They are also unsure about sharing the entire code and are considering pasting relevant parts from the error log. However, they ultimately decide to give up on compiling the code.
  • #1
hermy
41
0
Hello everybody!

I found this code on the net. It seems to have worked for everybody except for me. Most of the errors say there is some linking error. I am using dev c++ 5. I would like to know if the problem is with my compiler or the program.

You can download it on http://www.codeproject.com/KB/library/ProjectEliza.aspx#_comments" .

I am not sure if I should be pasting the entire code here. But you feel it's a better alternative, I'll surely do that.

Thanks for the help.
 
Last edited by a moderator:
Technology news on Phys.org
  • #2
I cannot download the code, because you need to login and I don't feel like registering.
But if you get linker errors, you probably need to link some library too. Perhaps it would help if you copy/pasted the relevant part from the log here, i.e. where it gives the errors and maybe some lines around it to give them context.
 
  • #3
Thanks CompuChip for checking that link out. But I'm giving up on this one. I am finding it really hard to compile a program written by some other programmer. Thanks for the help anyway!
 

1. What is a "linking error" in C++?

A linking error in C++ occurs when the compiler is unable to find or properly connect all the necessary pieces of code to create a functioning program. This often happens when there are missing or incorrect library files referenced in the code.

2. How can I fix linking errors in Dev C++ 5?

To fix linking errors in Dev C++ 5, make sure all necessary library files are included in the project and properly referenced. Check for any typos or incorrect file paths in the code. You may also need to adjust the compiler settings to link the necessary files.

3. Why am I getting a "undefined reference" linking error?

A "undefined reference" error occurs when there is a function or variable referenced in the code, but it is not defined in any of the included files or libraries. Make sure all necessary libraries are included and properly referenced in the code.

4. Is there a specific order in which libraries should be included to avoid linking errors?

Yes, the order in which libraries are included can affect linking errors. Generally, libraries should be included in the order of most dependent to least dependent. This means that libraries that are dependent on other libraries should be included first.

5. How can I prevent linking errors in my C++ code?

To prevent linking errors, make sure to properly include and reference all necessary libraries in your code. Avoid typos and incorrect file paths. It may also be helpful to regularly check for updates to libraries and ensure they are compatible with your code.

Similar threads

  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
2
Views
265
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
2
Replies
39
Views
3K
Replies
6
Views
1K
  • Programming and Computer Science
Replies
12
Views
1K
  • Programming and Computer Science
Replies
4
Views
2K
Back
Top