MathGL在Windows下的编译
来源:互联网 发布:红外图像处理算法 编辑:程序博客网 时间:2024/05/29 02:48
问题:
Windows下数据可视化问题:将数据生成可视图像。
环境:
Windows 10 64bits;Visual Studio 2013 Update 5;MathGL 2.4.1;CMake。
下载:
MathGL源码: mathgl-2.4.1.tar.gz
解压:
MathGL源码 到【解压目录】,如D:/mathgl-2.4.1
编译:
1 打开cmake-gui.exe
Where is the source code: 填入【解压目录】
Where to build the binaries: 填入【CMake 输出目录(自定义)】
点击按钮【Configure】,选择编译器类型【Visual Studio 12 2013】,configure出错,有很多红色。如图1.
点击红色区域的【Ungrouped Entrues】,去掉所有勾选项,只保留三个(enable-double, enable-opengl, enable-openmp)。
再次点击按钮【Configure】,提示“Configuring done”
点击按钮【Generate】,提示“Generating done”
至此,MathGL的VS2013工程【MathGL2.sln】 生成完毕。CMake软件使用完毕。
2 使用VS2013打开【CMake 输出目录(自定义)】下的MathGL2.sln解决方案
【本文章仅编译解决方案里面两个项目:mgl,mgl-static】
先编译项目mgl,出错:
错误1:没有打开文件“unistd.h”
在VC的include目录下(C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include)新建文件 unistd.h。内容如下:
/** This file is part of the Mingw32 package. * unistd.h maps (roughly) to io.h * Mylaf 2017-08-15 */#ifndef _UNISTD_H#define _UNISTD_H#include <io.h>#include <process.h>#endif /* _UNISTD_H */
错误2:E:\Mylaf\Rebuild\mathgl-2.4.1\src\prim.cpp(1188): error C2057: 应输入常量表达式
修改代码1:
//HMDT dat[m]; // 原始 HMDT* dat = new HMDT[m]; // 修改 mylaf 2017-08-15 if (dat==NULL) { return; }
修改代码2:(函数末尾,释放dat)
delete[] dat; // 添加 Mylaf 2017-08-15 dat = NULL; g->InPlot(0,1,0,1,true); gr->EndGroup(); gr->SetFontSize(ofsize);
- MathGL在Windows下的编译
- MathGL v2.1.3.1的编译步骤
- mathGL
- Meshlab在 Windows下的编译
- GDAL库在windows下的编译
- omnetpp在windows下的编译
- UMFPACK在Windows下的编译
- gtk+在windows下的编译环境
- jam 在windows下的编译
- OpenSSL在Windows下的编译安装
- FFMpeg 在Windows 环境下的编译
- openssl 在windows下的编译
- omnetpp在windows下的编译
- SpiderMonkey在windows下的编译
- QT phonon在windows下的编译
- GDAL1.6.0在Windows下的编译
- bundler_0.4在windows下的编译
- QT phonon在windows下的编译
- Java面试题全集(中)
- 如何通过牛顿方法解决Logistic回归问题 By 机器之心2017年8月09日 16:30 本文介绍了牛顿方法(Newton's Method),以及如何用它来解决 logistic 回归。log
- POJ-1475:Pushing Boxes(嵌套bfs或bfs+A*算法)
- 找出三个最大值demo
- window应用程序靠消息驱动、Marshal类、StructureToByte、ByteToStructure
- MathGL在Windows下的编译
- 二叉树的一些性质
- Java面试题全集(下)
- 安卓开发集成SMS短信验证码模块,mob平台
- Block内存管理
- Tomcat载入js文件时中文乱码,后台传值都正常
- ZOJ3432 Find the Lost Sock(异或运算)
- HDU4738 Caocao's Bridges【强连通】
- 企慧Q5快速开发平台系列之四:“零”代码理念