views:

342

answers:

2

How do I get blocks/grand central dispatch working in Snow Leopard? It appears that the library is not installed by default: when I try to do #include <dispatch/dispatch.h>, I get a library not found error.

I have tried making the source I found here: http://libdispatch.macosforge.org/ but it generated an error (internal.h:99:27: error: Block_private.h: No such file or directory + others), but I am not even sure if that is the correct source to use. Any pointers on how to get this to work are appreciated.

+1  A: 

I did not have to install anything special except for the developer tools. You shouldn't have to compile anything special to get dispatch.h. In fact, library not found implies that it's a linking error, not anything to do with dispatch.h itself.

For the record, dispatch.h is located at: /Developer/SDKs/MacOSX10.6.sdk/usr/include/dispatch/dispatch.h

Can we see the exact error message? Something doesn't make sense here.

Daniel Grace
A: 

Check that the project is set to use the 10.6 SDK.

Seth