On Mac OS X, what does the function gestalt do? What is it used for? Could you please give a brief example? I know that it has something to do with system calls, but what exactly?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Gestalt gives you details about the system the application is running on, such as the OS version. Here is a simple example to get the Mac OSX version on the system this binary is run:
compile and run this test with:
You may aslo need a flag like
-I/Developer/Headers/FlatCarbon/This should give a response like:
Mac Version: 10.6.8I created this example after reading the official docs.