构建QGIS - 设置Bison和flex的路径?

时间:2017-07-27 11:37:29

标签: c++11 qgis

我试图遵循(可能非常好)在Windows环境中构建QGIS的分步说明,因此我很难理解我将在CMAKE中为Bison和flex设置路径的位置我在哪里可以找到BINDINGS_GLOBAL_INSTALL选项?

我已从我的CMAKE错误消息error description

上传了一个打印屏幕

C编译器标识未知

CXX编译器标识未知

CMakeLists.txt的CMake错误:10(项目):

找不到CMAKE_C_COMPILER。

CMakeLists.txt的CMake错误:10(项目):

找不到CMAKE_CXX_COMPILER。

1 个答案:

答案 0 :(得分:0)

通过更改配置中的visual studio版本解决了问题。

因此,import collections import numpy as np import scipy def flat(x): ''' flattens a shallow list ex: [[1,2,3],[4,5],[6]] ----> flattens to [1,2,3,4,5] numpy flatten does not work on lists. ''' if isinstance(x, collections.Iterable): return [a for i in x for a in flat(i)] else: return [x] def func(X): '''setups the matrix dynamic equation and the set of constraints ''' A = [[0,1,0,1],[2,1,0,4],[1,4,1,3],[3, 2, 1,0]] A1 = [[1,0,1,-1], [0,-1,2,1],[1,2,0,1],[1,2,0,-2]] x = X[:-1] alpha = X[-1] x0 = [1,2,3,4] y = x - x0 # x[0] = 0.5 # x[3] = 0.3 dyneqn = np.dot(A,y) + alpha * np.dot(A1,x) cons = (1/2.0)*np.dot(x.T,np.dot(A1,x)) + np.dot([-1,1,2,-3], x) + 0.5 return flat([dyneqn, cons]) sol = scipy.optimize.root(func,[1,-1,2,0,-1]) sol.x 出现了新问题。我将在另一个问题中提出这个问题。