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 > Sched.h under OSX

Sched.h under OSX
Thread Tools
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Oregon or Alaska
Status: Offline
Reply With Quote
Jul 25, 2003, 09:29 PM
 
I hoping someone will just know the answer to this one...

I have a program that I'm trying to port that runs under linux and uses functions declared in sched.h (to set process priority with sched_setschedule I think). This header file is found just fine, so everything compiles well, but when it gets the linking stage, it doesn't have anything to link against and gives a symbol undefined error.

I did some searching and found that the Kernel framework has this header file in it, so I tried including that framework, but it didn't like that and claimed the framework could not be found.

So what can I link against? Are these functions usable in OSX? It seems they must be because Apple is including the header file, but....

Any help would be appreciated.

Jeffrey
Die Menchen verhöhnen was sie nicht verstehen.
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jul 26, 2003, 02:20 AM
 
How did you go about including the framework?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Oregon or Alaska
Status: Offline
Reply With Quote
Jul 26, 2003, 02:27 AM
 
Originally posted by Chuckit:
How did you go about including the framework?
I went to "Build"->"Add Frameworks..." and selected 'Kernel.framework'.. just as I did with CoreFoundation and IOKit... these other two worked fine...
Die Menchen verhöhnen was sie nicht verstehen.
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Jul 26, 2003, 03:10 AM
 
What are the symbol names that the linker is complaining about?
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Oregon or Alaska
Status: Offline
Reply With Quote
Jul 26, 2003, 03:43 AM
 
Originally posted by smeger:
What are the symbol names that the linker is complaining about?
sched_setschedule is the undefined symbol.

The program I'm working on porting is freediag (freediag.sf.net). This command is use in four place to set the process priority. While I could probably safely remove this whole command from the code, it would be preferable to keep the source code the same as the linux version.

Thanks for help/interest,
Jeffrey
Die Menchen verhöhnen was sie nicht verstehen.
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Jul 26, 2003, 04:41 AM
 
You may be SOL. This page states that if that function is present, a particular macro will be defined in unistd.h. It ain't.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jul 27, 2003, 09:34 AM
 
Kernel.framework is only for being linked against if you're running.... inside the kernel. Those symbols won't be accessible from userspace, they're probably inside the kernel itself. At least, I think that's how it is.
     
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Oregon or Alaska
Status: Offline
Reply With Quote
Jul 29, 2003, 12:18 AM
 
Hmmm, well, it doesn't sound too promising. Fortunately it isn't mission critical for my port, so I'm not dead in the water.

I appreciate the help,

Jeffrey
Die Menchen verhöhnen was sie nicht verstehen.
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jul 29, 2003, 12:56 AM
 
Originally posted by Doktorfaust:
Hmmm, well, it doesn't sound too promising. Fortunately it isn't mission critical for my port, so I'm not dead in the water.
Actually, I think there are other priority-setting functions in OS X if you want that functionality. Check out man setpriority.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
   
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 02:14 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