[GAP Forum] Compiling GAP for Use in C Program
Wolstenholme, Robert
robert.wolstenholme08 at imperial.ac.uk
Fri Feb 14 19:37:12 GMT 2014
I want to compile some of my GAP functions into static libraries for use in a C program. I have compiled them using gac -c on Ubuntu but I 'm not sure how to now call these functions in my C program. I tried a few things but whenever I tried to link and create a binary I got an error.
For example I initially tried a "Hello World" example with
HelloWorld.g =
-------------------------------------------------------------+
PrintEO := function ( n ) Print( "Hello World" ); end; |
-------------------------------------------------------------+
HelloWorldMain.c =
-----------------------+
#include <stdio.h> |
|
'''?void PrintEO()?'''' |
int main() |
{ |
'''?PrintEO()?''' |
return 0; |
} |
-----------------------+
Where I don't know what to put for the '''?PrintEO()?'''. I analysed the created source code using gac -C but it still wasn't clear to me. How would I go about getting this to work?
Rob
More information about the Forum
mailing list