开发者

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

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开发者_Go百科 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);
}


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


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


Mach-O type set this to Dynamic Library


I came across this error caused I delete my project's main file

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜