Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > executing problem

executing problem
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2004
Status: Offline
Reply With Quote
Mar 30, 2005, 02:06 PM
 
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
Reply With Quote
Mar 30, 2005, 03:00 PM
 
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.
20" iMac G5! :D AND MacBook 1.83GHz!
Canon Digital Rebel Kit + 75 - 300mm lens. Yum Yum! :D
Check out my OS X Musical Scales program
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Mar 30, 2005, 03:10 PM
 
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
Reply With Quote
Mar 31, 2005, 02:29 AM
 
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
Reply With Quote
Mar 31, 2005, 11:10 AM
 
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
Reply With Quote
Mar 31, 2005, 11:15 AM
 
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. )
20" iMac G5! :D AND MacBook 1.83GHz!
Canon Digital Rebel Kit + 75 - 300mm lens. Yum Yum! :D
Check out my OS X Musical Scales program
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Mar 31, 2005, 11:50 AM
 
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
Reply With Quote
Mar 31, 2005, 12:18 PM
 
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.
20" iMac G5! :D AND MacBook 1.83GHz!
Canon Digital Rebel Kit + 75 - 300mm lens. Yum Yum! :D
Check out my OS X Musical Scales program
     
Fresh-Faced Recruit
Join Date: Oct 2004
Status: Offline
Reply With Quote
Apr 2, 2005, 01:32 PM
 
Oops! That could be a problem . I'll try puting that in and running it, and i dont really pride myself on spelling .
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2