How to build wxmathPlot for win32?

2019-08-19 07:16发布

问题:

I downloaded the latest wxmathplot but the readme is a bit sparse with instructions on how to build on win32 platform.

Has anyone used this library for win32? Can someone point me to the docs or give some hints/advice on how to build for win32 targets.

We'll eventually use this for cross platform stuff, for now it is just win32 until we port our other code.

I presume I have to use CMake, but have not used it before and it is not obvious to me how to build this all - I have already installed CMake, but I am apparently too stupid to figure out how to build this library/samples.

Well, I managed to make an SLN file, but it was not obvious.

回答1:

I use wxMathPlot. I simply add mathplot.cpp and mathplot.h to the MSVS2008 C++ projects that need to use it. This compiles and links without my having to do anything special.



回答2:

Here is a partial answer - to get CMake to build an sln file:

Well, unfortunately there is no good documentation on how to build wxMathPlot on Windows, but it is very simple. Just use CMake:

http://www.cmake.org/

Download and install it, then open CMake gui, selecting the directory where you uncompressed wxMathPlot and a target build directory. click Configure twice and then click Generate. CMake does all its magic and you'll get project files to build wxMathPlot depending on your compiler. For example, if you use Visual Studio, a solution sln file is generated: open it and build.

That works for building an sln file