User loginNavigation |
SWI-Prolog FFI Problem: Getting Prolog and C to work together on MacOS?Hi, It seems that there are some issues with the foreign function interface specifically on MacOS. The Prolog manual has a very nice example of how to use FFI with C (http://gollem.science.uva.nl/SWI-Prolog/Manual/foreignxmp.html)... which this doesn't work for me on MacOS, but worked fine under Linux (Ubuntu 8.04 Hardy). I don't understand what's wrong with 'strlen' initially: $ gcc -I/opt/local/lib/swipl-5.6.15/include -fpic -c lowercase.c ... and even though we do get an object file in the end, we can't create (and register?) a library at the next step (this seems to be the MacOS-specific problem): $ gcc -shared -o lowercase.so lowercase.o Any suggestions? I couldn't find anything online except http://www.phil.uu.nl/~xges/HOWTO/swipldynlib.html which seems quite old? Should I go for it anyway? Thank you, By hWnd at 2008-06-17 18:54 | LtU Forum | previous forum topic | next forum topic | other blogs | 8063 reads
|
Browse archives
Active forum topics |
Recent comments
27 weeks 2 days ago
27 weeks 2 days ago
27 weeks 2 days ago
49 weeks 3 days ago
1 year 1 week ago
1 year 3 weeks ago
1 year 3 weeks ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 10 weeks ago