Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the 2 errors i get are :
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 (use -v to see invocation)

header:
C
#ifndef fraction_h_
#define fraction_h_

struct fraction{
    int wholeNumber;
    int numerator;
    int denominator;
};

struct fraction fractionCreate(int numerator, int denominator);
struct fraction fractionAdd(struct fraction a, struct fraction b);
struct fraction fractionSubtract(struct fraction a, struct fraction b);
struct fraction fractionMultiply(struct fraction a, struct fraction b);
struct fraction fractionDivide(struct fraction a, struct fraction b);
void fractionPrint(struct fraction f);

#endif
Posted
Updated 28-Oct-14 21:37pm
v2

1 solution

The error message comes from the linker (not the compiler). It complains about missing main function in your source file(s) (it has nothing to do with missing header file).
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900