 |
 |
Sched.h under OSX
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Oregon or Alaska
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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'."
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|