# Port Latest Core Foundations



## 2trill2spill (Jun 14, 2014)

I am trying to port the latest Open Source Version of Core Foundations. Here is the link to the source https://opensource.apple.com/source/CF/CF-855.14/.

When trying to compile CFBase.c I get lots of unknown type names CF_PRIVATE. Here is an example below.


```
./CFInternal.h:124:1: error: unknown type name 'CF_PRIVATE'
    CF_PRIVATE CFIndex __CFActiveProcessorCount();

    ./CFInternal.h:176:1: error: unknown type name 'CF_PRIVATE'
    CF_PRIVATE void _CFLogSimple(int32_t lev, char *format, ...);

    ./CFInternal.h:176:12: error: expected identifier or '('
    CF_PRIVATE void _CFLogSimple(int32_t lev, char *format, ...);
```

I've been able to deal with the other couple dozen errors, but now I am unable to find the declaration for CF_PRIVATE or any documentation on it.
Any help would be appreciated and here is the question on Stack Overflow https://stackoverflow.com/questions/24224241/core-foundations-where-is-cf-private-defintion. 

Thanks Have a great day.


----------



## sotownsend (Jun 24, 2014)

It is located in https://opensource.apple.com/source/CF/CF-855.14/CoreFoundation_Prefix.h.


```
#if !defined(CF_PRIVATE)
#define CF_PRIVATE __attribute__((__visibility__("hidden")))
#endif
```
Perhaps you removed the 
	
	



```
-include CoreFoundation_Prefix.h
```
 in the MakeFile?

```
CFLAGS=-c -x c -pipe -std=gnu99 -Wmost -Wno-trigraphs -mmacosx-version-min=$(MIN_MACOSX_VERSION) -fconstant-cfstrings -fexceptions -DCF_BUILDING_CF=1 -DDEPLOYMENT_TARGET_MACOSX=1 -DMAC_OS_X_VERSION_MAX_ALLOWED=$(MAX_MACOSX_VERSION) -DU_SHOW_DRAFT_API=1 -DU_SHOW_CPLUSPLUS_API=0 -I$(OBJBASE) -DVERSION=$(VERSION) -include CoreFoundation_Prefix.h
```

Best of luck.


----------

