calc_values.o: In function `calculate_values\': calc_values.c:(.text+0x3f): unde
ID: 3649713 • Letter: C
Question
calc_values.o: In function `calculate_values':calc_values.c:(.text+0x3f): undefined reference to `calc_install'
calc_values.c:(.text+0x59): undefined reference to `calc_subtotal'
calc_values.c:(.text+0x71): undefined reference to `calc_price'
main.o: In function `main':
main.c:(.text+0x82): undefined reference to `calc_values'
print_values.o: In function `print_values':
print_values.c:(.text+0x4f): undefined reference to `print_measure'
collect2: ld returned 1 exit status
I writing a program that 8 functions and one main program that pulls information from those 8 functions.
1. read_data
2) calc_values
- calc_install
- calc_subtotal
- calc_price
3.) print_values
- print_results
-print_measurements
so those are my three functions with the 5 subfunctions.
pulling the information from those 8 total functions is called main.c
when i try to compile these functions with gcc, i get the above error message.
Please help!
Explanation / Answer
An error message alerts users of a problem that has already occurred. By contrast, a warning message alerts users of a condition that might cause a problem in the future. Error messages can be presented using modal dialog boxes, in-place messages, notifications, or balloons. A typical modal error message. Effective error messages inform users that a problem occurred, explain why it happened, and provide a solution so users can fix the problem. Users should either perform an action or change their behavior as the result of an error message. Well-written, helpful error messages are crucial to a quality user experience. Poorly written error messages result in low product satisfaction, and are a leading cause of avoidable technical support costs. Unnecessary error messages break users' flow. Note: Guidelines related to dialog boxes, warning messages, confirmations, standard icons, notifications, and layout are presented in separate articles. Is this the right user interface? To decide, consider these questions: Is the user interface (UI) presenting a problem that has already occurred? If not, the message isn't an error. If the user being alerted of a condition that might cause a problem in the future, use a warning message. Can the problem be prevented without causing confusion? If so, prevent the problem instead. For example, use controls that are constrained to valid values instead of using unconstrained controls that may require error messages. Also, disable controls when clicking would result in error, as long as it's obvious why the control is disabled. Can the problem be corrected automatically? If so, handle the problem and suppress the error message. Are users likely to perform an action or change their behavior as the result of the message? If not, the condition doesn't justify interrupting the user so it's better to suppress the error. Is the problem relevant when users are actively using other programs? If so, consider showing the problem using a notification area icon. Is the problem not related to the current user activity, does it not require immediate user action, and can users freely ignore it? If so, use an action failure notification instead. Does the problem relate to the status of a background task within a primary window? If so, consider showing the problem using a status bar. Are the primary target users IT professionals? If so, consider using an alternative feedback mechanism, such as log file entries or e-mail alerts. IT professionals strongly prefer log files for non-critical information. Design concepts The characteristics of poor error messages It should be no surprise that there are many annoying, unhelpful, and poorly written error messages. And because error messages are often presented using modal dialogs, they interrupt the user's current activity and demand to be acknowledged before allowing the user to continue. Part of the problem is that there are so many ways to do it wrong. Consider these examples from the Error Message Hall of Shame: Unnecessary error messages Incorrect: This example from Windows® XP might be the worst error message ever. It indicates that a program couldn't launch because Windows itself is in the process of shutting down. There is nothing the user can do about this or even wants to do about this (the user chose to shut Windows down, after all). And by displaying this error message, Windows prevents itself from shutting down! The problem: The error message itself is the problem. Aside from dismissing the error message, there is nothing for users to do. Leading cause: Reporting all error cases, regardless of users' goals or point of view. Recommended alternative: Don't report errors that users don't care about. "Success" error messages Incorrect: This error message resulted from the user choosing not to restart Windows immediately after program removal. The program removal was successful from the user's point of view. The problem: There's no error from the user's point of view. Aside from dismissing the error message, there is nothing for users to do. Leading cause: The task completed successfully from the user's point of view, but failed from the uninstall program's point of view. Recommended alternative: Don't report errors for conditions that users consider acceptable. Completely useless error messages Incorrect: Users learn that there was an error, but have no idea what the error was or what to do about it. And no, it's not OK! The problem: The error message doesn't give a specific problem and there is nothing users can do about it. Leading cause: Most likely, the program has poor error handling. Recommended alternative: Design good error handling into the program. Incomprehensible error messages Incorrect: In this example, the problem statement is clear, but the supplemental explanation is utterly baffling. The problem: The problem statement or solution is incomprehensible. Leading cause: Explaining the problem from the code's point of view instead of the user's. Recommended alternative: Write error message text that your target users can easily understand. Provide solutions that users can actually perform. Design your program's error message experience—don't have programmers compose error messages on the spot. Error messages that overcommunicate Incorrect: In this example, the error message apparently attempts to explain every troubleshooting step. The problem: Too much information. Leading cause: Giving too many details or trying to explain a complicated troubleshooting process within an error message. Recommended alternative: Avoid unnecessary details. Also, avoid troubleshooters. If a troubleshooter is necessary, focus on the most likely solutions and explain the remainder by linking to the appropriate topic in Help. Unnecessarily harsh error messages Incorrect:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.