Ask your own question, for FREE!
Computer Science 13 Online
OpenStudy (anonymous):

C Question: What's wrong with my source code?

OpenStudy (anonymous):

Alright, I'm having problems with functions. Whenever I try to compile the source code, it returns this: 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 I removed the actual contents of the functions because they aren't the problem. #include <stdio.h> void MainMenu(); void ProcessChoice(); void ProcessMenuReturn(); void ExchangeRates(); char Choice, MenuReturn; float Rates[7] = { 43.90 , // USD 59.50 , // EUR 34.12 , // SGD 0.58 , // JPY 67.94 , // GBP 45.24 , // AUD 43.07 }; // CAD void MainMenu() { //some code here } void ProcessChoice() { //some code here } void ProcessMenuReturn() { //some code here } void ExchangeRates() { // some code here }

OpenStudy (anonymous):

is there a main() function anywhere in your program?

OpenStudy (anonymous):

I don't see one. There is no entry point to the code.

OpenStudy (anonymous):

first of all as mentioned, you are missing the main() function, which is the entry to your program, this is needed in C/C++, but there exists other languages which does not require main function, like python (the whole file it self becomes the main when it is executed)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Breathless: Spooky witch but cute
5 hours ago 3 Replies 0 Medals
Arriyanalol: help
5 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 4 Medals
Jaded012023: Please tell me what you all think of this song
8 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
8 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!