Re: Using SystemConfiguration API inside KEXT
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 Dear Jean-Daniel, The directive was very specific; "<SystemConfiguration/SystemConfiguration.h>" Shalom, John B. Brown. [jbb@vcn.com] 358 High Street, Buffalo, Wyoming 82834 "Freedom is not worth having if it does not include the freedom to make mistakes" Mahatma Gandhi "If any question why we died, tell them, because our fathers lied." Rudyard Kipling "A man who does not know the truth is just an idiot but a man who knows the truth and calls it a lie is a crook." Bertolt Brecht "I wonder whether the world is being run by smart people who are putting us on or by imbeciles who really mean it." Mark Twain Le 11 mai 2010 à 18:11, John B Brown a écrit : Unless you have a sub-directory under /usr/include/ called /usr/include/SystemConfiguration/ your call will not find any files in that directory using #include<SystemConfiguration/SystemConfiguration.h> as the #include directive. We are talking about Mac OS X development. AFAIK, all Mac OS X compilers know how to handle a framework and know how to find a header in a Framework bundle. This include directive is perfectly valid, or would be if it was an user space program, but Kernel Extension can't use user space framework, so whatever (useless) compiler flag you add, it will not works. -- Jean-Daniel On my machine running Mac OS 10.6.3 and Xcode 3.2.2 the only files SystemConfiguration.h are in sub-directories "Headers" in all cases, not in any sub-directory "SystemConfiguration." Use findutils! Set your #include accordingly. It might help also to use '-I"some tree"' in your C flags to the compiler, like -I/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks\/SystemConfiguration.framework/Versions/A/Headers or wherever 'locate SytemConfiguration.h' finds that you like and that is found on your system. You might have to go to [ftp://ftp.gnu.org/gnu/] to find a real working source for findutils; the piece of crap Apple gives you in their system load is just that, a piece of crap. You have practically zero control over what it finds when their version of 'updatedb' runs. Needless to say, updatedb does NOT exist in your path so you must go to some considerable trouble to run it whenever you wish. By the way, is your NKE a sneaker control, a navigation system, or some sort of motion detector? Hi, I am developing a NKE. Now I need to call SystemConfiguration framework API to find primary interface. When I tried to include <SystemConfiguration/SystemConfiguration.h>, I always get compiliation error saying not able to find the header file. Any ideas? TIA. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... which means if such a specific LOCATION does not exist the header file will NOT be found no matter where in the /Developer tree, or even in ANY tree, 'SystemConfiguration.h' might be. Computers only do what they are told. They can not magically know what you "really" want. On 5/11/10 10:18 AM, Jean-Daniel Dupas wrote: On 5/11/10 9:11 AM, Andy Huang wrote: This email sent to site_archiver@lists.apple.com
participants (1)
-
John B Brown