开发者

OSX API Question: Where does BlockZero live? [closed]

开发者 https://www.devze.com 2022-12-20 08:42 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

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 question

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

0

精彩评论

暂无评论...
验证码 换一张
取 消