|
From: Timothée L. <tim...@lp...> - 2008-10-13 13:21:12
|
Petr Mikulik a écrit : >> Yes, wxt does work for Windows. "Official" windows binaries that are >> distributed on our SourceForge page are not built with it though. With >> those, you have to use the default "win" terminal. To use wxt on Windows, >> you can either build gnuplot by yourself with MinGW or MSVC (MinGW should >> work with the untouched code base). >> Additionally, Michael Goffioul has built a Windows package for Octave, >> that also contains gnuplot with wxt ! >> > > I tried to compile gnuplot with wxt on Windows by MingW, but it failed. How > can I do it? I did the following: > > I have downloaded the files below from > http://www.gtk.org/download-windows.html > and unzipped them into the MingW32 directory: > > cairo-dev-1.6.4-2.zip > cairo-1.6.4-2.zip > glib-dev_2.18.0-1_win32.zip > glib_2.18.0-1_win32.zip > pango-dev-1.20.5.zip > pango-1.20.5.zip > > >From the wx homepage I've got and unzipped into D:/wxMSW-2.8.8 > wxMSW-2.8.8.zip > These are source code. Unfortunately I couldn't compile it, the make always > failed in some part of its makefile.gcc. I couldn't repair it. Any idea what > to do? > > Hi Petr, I think the way that has more chances to succeed to build wxMSW is to use the autotools instead of the makefile. You'll need autoconf, automake, pkgconfig (as you mention below), of course cairo, glib and pango (available as win32 binaries and headers on ftp.gtk.org), and possibily a couple of other tools/libraries (I remember having to install zlib). > Anyway, I proceeded further. In gnuplot's makefile.mgw, I had to change: > ifdef WXT > CFLAGS += -DWXWIDGETS -ID:/wxMSW-2.8.8/include > CFLAGS += -ID:/Apps/MingW32/MingW344/include/cairo > CFLAGS += -ID:/Apps/MingW32/MingW344/include/glib-2.0 > WX_OBJS = wxt_gui.o gp_cairo.o > endif > > because there is nothing like "wx-config" and "pkg-config" on my PATH as > shell'ed from makefile.mgw. > > Once you have built wxMSW, you'll get wx-config. You should install pkg-config too to get cairo and pango flags. > In gnuplot/src/wxterminal/wx_gui.cpp, I had to uncomment this code: > #ifdef __WXMSW__ > /* the following is done in wxEntry() with wxMSW only */ > wxSetInstance(GetModuleHandle(NULL)); > wxApp::m_nCmdShow = SW_SHOW; > #endif > because wxSetInstance() was not known. > Did you mean "comment" or "uncomment" ? > Then the compilation > make -f makefile.mgw > worked. > > But linking does not work, it complains about many undefined references. It > seems wgnuplot.exe wants to be linked against the wx library. Of course ! > But it was not > available as I couldn't compile it. I though the library may not be needed > and some dll's could be used instead -- Michael's wgnuplot has dependencies > to many dll's. > You not only need dlls but also .lib files that correspond to symbol lists or something like that. > Could somebody describe a procedure how to compile wxt under MingW? How to > have it static or with dll's? > > Thanks. > > --- > PM > I'll try, if I find some time... Timothée Lecomte |