Re: Systems for writing a science app front-end
Neil Pilgrim wrote:
> Helen Faulkner wrote:
>> Neil Pilgrim wrote:
>>> Interested to hear what people think wrt platforms/systems in which to
>>> write a front-end for a console scientific app (typically long-running).
>>> What would people recommend?
>> I use C++ + wxWidgets for the apps that run my (theoretical optics)
>> I chose wxWidgets for writing the GUI mainly because it is available for
>> windows too, and this allowed me to cross-compile my code into windows
>> .exes for
>> people in my group who don't use linux.
> My current simulation code is also c++, but if I were to aim for
> multi-platform GUI, that wasn't too performance-sensitive, then I would
> be inclined to go for something like python/wxpython or similar. I'm
> sure that once C++ codes are compiled then they are easier to use/setup,
> but afaict python seems to something that (within reason) should just
> run with few changes - and installation can be managed through a .exe?
> Not currently using windows, I wouldn't be keen to get involved in going
> through the (presumed) hassle necessary to get it compiled under windows
> - or do you use cygwin or msys(mingw) ?
I cross-compile using Debian's mingw32 package. You have to first cross-compile
the libraries that your code depends on (for me that's fftw3, blitz++,
wxWidgets, gsl...), then cross-compile your own code, linking to the
cross-compiled libraries. I use kdevelop, which makes it easy to compile the
different versions of my code, and I've had enough practise at cross-compiling
by now that it's not a big hassle to do, especially since you only need to
cross-compile the libraries once.
The cross-compiling commands for the libraries go like this:
/wxWindows-2.4.2/windows> ../configure --host=i586-mingw32msvc
Where we assume a created windows/ dir in the top level directory of the
wxWindows source tree and that /home/username/mingw32 is where you want the
cross-compiled libraries to go.
The final result is a statically linked windows .exe. It's large, but ok for my
purposes. It needs a .dll file for mingw (mingw10.dll) to run.
>> I decided to switch to a GUI interface precisely to make it easier to
>> see which
>> parameters were being changed when, and so I could easily do things
>> like keep a
>> running count of the simulation results (I mainly deal with longish
>> algorithms) and draw graphs representing the state of the system. I'm
>> there are other things that would work as well, though, especially
>> since qt is
>> now better licensed.
> Do you use a wx plotting tool, or something like matplotlib? There seems
> to be some glue code to allow these to work together, which looks quite
I use the wx plotting tools to draw my own plots, which are simple greyscale
representations of the data. I haven't tried matplotlib.
> I thought that QT under windows required a commercial license for
> distributing, or has this changed?
As Christian said, this changed recently. Seeing as I use kde, I might well
have chosen qt over wxWidgets had the licensing change happened before I made
that decision. But I'm happy enough with wx now.