OSX API Question: Where does BlockZero live? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
开发者_JAVA百科 Improve this questionI'm trying to compile a program I've been working with on OSX 10.6 It compiles fine under 10.5 but now I get an undeclared error for something called BlockZero.
I'm not sure what this function is, what it does or where it lives. What do I have to import to fix this?
Some Googling suggests it might be part of Carbon. Is there a particular framework I can link against?
In case anyone else runs into this: BlockZero is a function that seems to zero a block of memory. It lives in CoreServices and is defined in MacMemory.h. The problem is that the function is unavailable to apps being compiled as 64bit (which is the default; hence my problem). To fix this issue use the BSD function bzero.
Source: http://developer.apple.com/mac/library/documentation/Carbon/Conceptual/Carbon64BitGuide/OtherAPIChanges/OtherAPIChanges.html
精彩评论