[metapost] Trying to figure out MPLib
samjnaa at gmail.com
Fri Aug 3 08:37:28 CEST 2012
I'm trying to figure out how to integrate MPLib into my C++
application. First I'm working out with C. Since the documentation is
*very* sparse I'm trying to feel my way around here. Any help would be
Basically I've compiled the stable MPost release 1.212 and from
various places in the source tree I've extracted the following files:
libkpathsea.a libmplib.a mplib.h mplibps.h
and put them in one directory. In the same directory I have my file
test.c and I'm compiling this using gcc -o test test.c -L . -l mplib
-l kpathsea. (Building using GCC 4.6.3 on Kubuntu Precise on an i5
64-bit system.) The compilation goes smoothly enough, but trying to
execute simple metapost commands using mp_execute fails. The same
commands produce a graphic on my regular metapost install.
Can anyone please help me with this? Do I need to load the plain file
or something? How to do that? Do I need to first input a \relax
command before starting with beginfig() and stuff? Please help.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 656 bytes
Desc: not available
More information about the metapost