tags:

views:

44

answers:

1

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?

+4  A: 

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

Daniel
+1 for excellent follow up
kb