0

I am writing a program using C, which, given two points, and a value x in between them, a function "Interp" will interpolate a corresponding value for y. I am receiving a message that says "undefined symbols for architecture", and I'm not sure how to fix it. Any help would be appreciated.

#include <stdio.h>
#include <math.h>

double Interp(double x_1, double y_1, double x_2, double y_2, double x) {
double k,y,b;
k = (y_2-y_1)/(x_2-x_1);
b = y_2-(k*x_2)
y = k*x+b;
return(y);
}

The result is a message saying "Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64 clang: error linker command failed with exit code 1"

I don't know what this means so any guidance would be very helpful!

Wheels
  • 11
  • 1
  • 6
    Your program needs a `main` function. – paddy Mar 26 '19 at 03:30
  • Possible duplicate of [Compiling a .C file: Undefined symbols for architecture x86\_64](https://stackoverflow.com/questions/19572665/compiling-a-c-file-undefined-symbols-for-architecture-x86-64) – grek40 Mar 26 '19 at 07:09

0 Answers0