0

Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?

I am passing a dynamic array of integers to a function and I can't get it to work.

int * tempP1;

tempP1 = new int [numP1+1];

Call:

Polynomial P1(numP1, tempP1);

Prototype:

Polynomial(int tempNum, int * tempPoly);

Function:

Polynomial::Polynomial(tempNum, int *tempPoly)

Error:

Undefined symbols for architecture x86_64:
  "Polynomial::Polynomial(int, int*)", referenced from:
     _main in ccDOuaGg.o
  "Polynomial::~Polynomial()", referenced from:
     _main in ccDOuaGg.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Any help would be much appreciated :)

Community
  • 1
  • 1
Daniel Del Core
  • 3,071
  • 13
  • 38
  • 52

1 Answers1

0

I figured out the problem. I was compiling this program wrong way.

Rais Alam
  • 6,970
  • 12
  • 53
  • 84
Daniel Del Core
  • 3,071
  • 13
  • 38
  • 52