Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
- The problem statement, all variables and given/known data:
The problem is a function which i typed although it kept saying that it is a undefined reference still. other function worked fine but the main problem is pinpointing at display.h
driver1.c:(.text+0x11): undefined reference to `write_message'
driver1.c:(.text+0x3c): undefined reference to `write_exp'
driver1.c:(.text+0x4b): undefined reference to `write_char'
driver1.c:(.text+0x68): undefined reference to `write_char'
- Relevant commands, code, scripts, algorithms:
this file is given
/* File: display.h
by: Tep Dobry
login: tep
date: 20 Mar 03
*/
/* This file contains the prototypes for useful funcitons in display.o
library */
#define MYFLUSH(c) while((((c) = getchar()) != '\n') && ((c) != 13));
void write_char(char);
/* This function is given a character and writes it to the display.
The characters recognized to be written include the digits, '0'..'9',
the operators, '+', '-', 'x', '/', and '=', the period, '.', and
the special characters, 'q', ' ', '\n', and '\b'. The
special characters are explained in the documentation.
*/
void write_exp(char);
/* This function is given a character and writes it as an exponent to
the dispaly. The characters recognized to be written are
the digits '0'..'9', and the minus sign, '-'.
*/
void write_message(char *);
/* This function is given a string which is written in the center
of the top line of the display. It also initializes the
dispaly.
*/
void write_error(char *);
/* This function is given a string which is written to the bottom line
of the display and causes the display to beep.
*/
void write_debug(int);
/* This function is given an integer which is written to the bottom line
of the display to be used as debugging output in the program
*/
- The attempts at a solution (include all code and scripts):
main()
{ char ch;
/* Initialize the dispaly with a message */
write_message("Display Test");
/* while not quitting */
while((ch = getchar()) != 'q')
{
/* if exponent character */
if( is_exp(ch))
/* write the converted exponent character */
write_exp(exp_value(ch));
/* otherwise write the character */
else write_char(ch);
}
/* write the q character to terminate the dispaly */
write_char(ch);
}
- Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University of Hawaii at Manoa, Honolulu(HI), Oahu (Hawaii), tep dobry, ee160 EE 160: Homework 4
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).