A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 4 years ago

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

  • This Question is Closed
  1. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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 }

  2. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

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

  3. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

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

  4. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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)

  5. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.