tags:

views:

50

answers:

2

Hi, I'm a beginner in C++ programming and I keep getting this error message. I have no idea what it means...I'm using XCode for Macs version 3.2.4, 64-bit. Could someone tell me what this means?

the error message is:

start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

If you need a look at my program, here it is:

using namespace std;

float area (float x0, float y0, float x1, float y1, float x2, float y2) 
{

    float a;
    float m1;
    float m2;

    cin >> x0 >> y0 >> x1 >> y1 >> x2 >> y2;

    a = ((x1 - x0) * (y2 - y0) - (x2 - x0) * (y1 - y0)) / 2;

    m1 = (y1 - y0) / (x1 - x0);
    m2 - (y2 - y1) / (x2 - x1);

    if (m1 = m2)
        a = 0;
    if (m2 > m1 && x2 >= x1)
        a = a;
    if (m2 > m1 && x1 >= x2)
        a = -a;
    if (m1 > m2 && x2 > x1)
        a = -a;
    if (m1 > m2 && x1 > x2)
        a = a;

    return (a);
}
A: 

The given function don't have problem. The error may depend on:-

  1. where and how you are calling this function
  2. The headers are included properly
pkumar
A: 

Is it just telling you there's no main function?

Mark B