简体   繁体   English

如何为Win32构建wxmathPlot?

[英]How to build wxmathPlot for win32?

I downloaded the latest wxmathplot but the readme is a bit sparse with instructions on how to build on win32 platform. 我下载了最新的wxmathplot,但是自述文件很少,其中包含有关如何在win32平台上进行构建的说明。

Has anyone used this library for win32? 有人将这个库用于win32吗? Can someone point me to the docs or give some hints/advice on how to build for win32 targets. 有人可以指出我的文档,也可以给我一些提示/建议以构建Win32目标。

We'll eventually use this for cross platform stuff, for now it is just win32 until we port our other code. 最终,我们将把它用于跨平台的工作,现在,直到移植其他代码,它才是win32。

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. 我想我必须使用CMake,但以前从未使用过它,而且对我来说,如何构建所有这些对象也不是很明显-我已经安装了CMake,但是我显然太愚蠢,无法弄清楚如何构建此库/示例。

Well, I managed to make an SLN file, but it was not obvious. 好吧,我设法制作了一个SLN文件,但这并不明显。

Here is a partial answer - to get CMake to build an sln file: 这是部分答案-使CMake构建sln文件:

Well, unfortunately there is no good documentation on how to build wxMathPlot on Windows, but it is very simple. 好吧,不幸的是,没有关于如何在Windows上构建wxMathPlot的好的文档,但这非常简单。 Just use CMake: 只需使用CMake:

http://www.cmake.org/ http://www.cmake.org/

Download and install it, then open CMake gui, selecting the directory where you uncompressed wxMathPlot and a target build directory. 下载并安装它,然后打开CMake gui,选择要在其中解压缩wxMathPlot的目录和目标构建目录。 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. CMake尽了其所有的魔力,您将获得项目文件来构建wxMathPlot,具体取决于您的编译器。 For example, if you use Visual Studio, a solution sln file is generated: open it and build. 例如,如果您使用Visual Studio,则将生成一个解决方案sln文件:将其打开并生成。

That works for building an sln file 这适用于构建sln文件

I use wxMathPlot. 我使用wxMathPlot。 I simply add mathplot.cpp and mathplot.h to the MSVS2008 C++ projects that need to use it. 我只是将mathplot.cpp和mathplot.h添加到需要使用它的MSVS2008 C ++项目中。 This compiles and links without my having to do anything special. 无需我做任何特殊的事情就可以编译和链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM