doc/cpp/ffi

Differences between version #8184 and #8185

20a21
> ===== Static Linking =====
21a23
> When generating a static library (as required by iPhone), instead of a dynamic ndll, some care must be taken to ensure the "DEFINE_PRIM" macro works correctly.  Most linkers today will only pull symbols from a static library if then exist in an obj file (ie, c++ file) that has other symbols explicitly required be the application.  Since the CFFI functions are located by name, the linker does not explicitly know they are required, so the exporting DEFINE_PRIM macros will not be linked, and will not export their functions.  To fix this, ensure that there is at least 1 real symbols in each c++ file that is referred to externally.  This can simply be a dummy function, or an "extern int".  Putting all the CFFI "glue" functions in a single file is not such a bad idea, and reduces this problem to a single symbol.
22a25,28
> ===== Array Access =====
> 
> One of the main differences between neko CFFI and C++ CFFI is how arrays are treated.
> 

	
Ver Date Lg User Action
#15144 2012-07-21 20:05:21 en jan_flanders View | Diff
#15143 2012-07-21 20:03:42 en jan_flanders View | Diff
#9172 2010-09-03 02:37:32 en Conrad View | Diff
#9149 2010-08-28 20:22:22 en Conrad View | Diff
#9148 2010-08-28 20:15:00 en Conrad View | Diff
#8189 2010-03-08 07:48:30 en gamehaxe View | Diff
#8188 2010-03-08 07:38:06 en gamehaxe View | Diff
#8187 2010-03-08 07:24:10 en gamehaxe View | Diff
#8186 2010-03-08 07:11:29 en gamehaxe View | Diff
#8185 2010-03-08 06:21:32 en gamehaxe View | Diff
#8184 2010-03-08 06:08:54 en gamehaxe View | Diff
#8183 2010-03-08 05:52:21 en gamehaxe View | Diff
#8181 2010-03-05 06:40:30 en gamehaxe View | Diff
#8180 2010-03-05 06:22:14 en gamehaxe View | Diff
#8179 2010-03-05 06:22:14 en gamehaxe Set title to C Foreign Function Interface

Previous | Next