Xcode Mac OS X 10.7.5 doesn't compile file with math header
I've written a simple program (just at the beginning of my programming path). A few people have tested it on their machines, and it works: their Xcode compiles the program. My Xcode does not.
Here is the program.
#include <math.h>
#include <stdio.h>
int main (void)
{
float x = 2.55, y1, y2 ;
int i = 3, z = 2 ;
y1 = pow( x, i ) ;
y2 = pow( x, z ) ;
float result ;
result = 3 * y1 - 5 * y2 + 6 ;
printf ("If x equals %f, then the given polynomial equals %f\n", x, result) ;
return 0 ;
}
Here is what I get after trying to compile:
alla [11:41 AM]
95-28-37-123:~ Alla$ gcc Prog3task6add.c -o Prog3task6add
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
Besides this program, programs with simple #include
I use Mac OS X 10.7.5 Scode 4.6.3
Thank you very much!
MacBook Pro, Mac OS X (10.7.5), Xcode 4.6.3