Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When I compile my program, I get an error message like this: “undefined reference to sqrt\” (or exp, or something else). How do I fix it?

Error exp message program
0
Posted

When I compile my program, I get an error message like this: “undefined reference to sqrt\” (or exp, or something else). How do I fix it?

0

When you see an error message that says “undefined reference”, it means that you’re using library functions that you didn’t tell it to link with, even though you told it what .h files to use. For this course, you shouldn’t have to worry about the details of doing this, so here’s how to handle the problem. First, be sure you’re compiling on gauss. If you’re compiling on gauss and are having trouble, it is likely because you don’t have the correct aliases set up (don’t worry too much about what that means). The short-term solutions is to type the following in the terminal window where you are trying to compile.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123