[metapost] First GUI application linking to MPLib?

Reinhard Kotucha reinhard.kotucha at web.de
Fri Aug 10 23:44:38 CEST 2012

On 2012-08-10 at 22:24:55 +0530, Shriramana Sharma wrote:

 > Hello! Thanks to the great help of all you nice people (who are very
 > patient with my multiple frequent posts), and with a special thanks to
 > Taco, I'm happy to say that I've successfully written a GUI program
 > using Qt linking to MPLib. Perhaps it's the first? (I'm not aware of
 > any previous attempts.)
 > FWIW I've attached it. The ZIP contains all that is needed except the
 > libmplib.a and a Qt development installation. Note that I've manually
 > inserted the locations of the include and lib directories for
 > compiling and linking into the makefile (and not using the usual Qt
 > mechanism) so that may need to be changed on your system.
 > Currently it doesn't do much -- it just takes hardcoded MP drawing
 > commands and displays the produced result -- but I'm happy at least
 > this "first light" stage is crossed so hereafter things can be taken
 > ahead. Considering the future development (though it's not much now),
 > the program is under the GPL.

I tried to compile your program under Gentoo x86_64-linux.  The qt4
libraries are found after I adapted the argument of -L in the
But where do I get mplib.a from?  I ran

  ./build.sh ; find . -name 'mplib.*'

in both svn directories, metapost/trunk and luatex/trunk, but only saw
mplib.h and some autoconf related files.


Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the metapost mailing list