I have to make a header file (my.h) that is included in each of the functions i
ID: 3649764 • Letter: I
Question
I have to make a header file (my.h) that is included in each of the functions i have to write. This is what it looks like:#include <stdio.h>
#define LABOR_COST 0.35
#define TAX_RATE 0.085
#define PERCENT 100
int main(void);
void function1( int*, int*, int*, double*);
void function_2( int, int, int, double, int*, double*, double*,
double*, double*, double*, double*, double* );
void function_a( int, int, int, double, int*, double*,
double*, double* );
void function_b( double*, double*, double, double, double, int );
void function_c( double*, double*, double );
void function_3( int, int, int, double, double, double, double, double,
double, double, double, int );
void function_d( int, int, int );
void function_e( int, double, double, double, double, double, double,
double, double );
can anyone see anything in this that would be causing this error message?
calc_values.o: In function `function_2':
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+0x28): undefined reference to `read_data'
main.c:(.text+0x87): undefined reference to `calc_values'
main.c:(.text+0xc9): undefined reference to `print_values'
print_values.o: In function `function_3':
print_values.c:(.text+0x4f): undefined reference to `print_measure'
print_values.c:(.text+0x86): undefined reference to `print_charges'
collect2: ld returned 1 exit status
Explanation / Answer
from the code you have there, you did not include the header file you made include it with: #include "my.h" and make sure your my.h has these lines in it: #ifndef MY_H #define MY_H #endif otherwise, just post your my.h so we can see it