 |
 |
executing problem
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2004
Status:
Offline
|
|
When I build my source code it works fine. But when I execute the code it gets an error.
ZeroLink: unknown symbol '_menu'
Executable “Number Game ” has exited due to signal 6 (SIGABRT).
Can some one please tell me whats wrong. I tried this program earlier and it worked fine.

|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status:
Offline
|
|
Does this error happen when executing your program in XCode or when you try to run it as a standalone program?
I've run into an issue where the program will run through XCode but won't run as a standalone. I don't know why this happens. When it does happen though I have to create a blank new project, then import all my files and recompile. Then it works fine.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
You're using ZeroLink. This means linking errors are delayed to runtime.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Yes, but you should get a warning at least during compilation.
The problem is that the compiler can't find the menu() function. Does it exist?
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2004
Status:
Offline
|
|
Heres my code. All I am trying to do is create a simple menu with a switch statement. I am just learing C.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define DELAY 150000
int menu(void);
void delay(void);
int main()
{
while(1)
{
switch(menu())
{
case 1:
{
puts("\nExicuting choice 1...");
delay();
}
case 2:
{
puts("\nExicuting choice 2...");
delay();
}
case 3:
{
puts("\nExicuting choice 3...");
delay();
}
default:
{
puts("\nNot a choice, try again.");
}
}
}
return 0;
}
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status:
Offline
|
|
First off, where are your menu() and delay() functions?
Also, all your case statements should end with a break; statement. Otherwise your code will execute every case statement after the first one it enters.
One more thing, It's "Executing" not "Exicuting". 
(Last edited by PBG4 User; Mar 31, 2005 at 12:17 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by PBG4 User:
First off, where are your menu() and void() functions?
I believe you mean menu() and delay().
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status:
Offline
|
|
Originally posted by Angus_D:
I believe you mean menu() and delay().
Oops!  Fixed. That's what I get for trying to correct a spelling error. The point still stands though. If you have a function prototype without the accompanying function your program isn't going to work.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2004
Status:
Offline
|
|
Oops! That could be a problem  . I'll try puting that in and running it, and i dont really pride myself on spelling  .
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|