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 | 8038 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 18 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago