在Windows上安装MAPNIK,提供C++ 14标准问题,clang或g++
我遵循了
我有第14版。但是,当我尝试在Windows上安装Mapnik时,它说:“ C ++编译器不支持C ++ 14标准(-std = C ++ 14),这是必需的。请升级您的编译器
” ./configure cxx = clang ++ -14 cc = clang-14
scons:读取sconscript文件...
欢迎使用mapnik ...
配置构建环境...
在释放模式下在Windows上配置...
检查pkg-config ...没有
检查freetype-config ...没有
检查dlfcn.h支持...否
检查编译器(clang ++ -14)是否支持-STD = C ++ 14标志...(加速)NO
C ++编译器不支持C ++ 14标准(-std = C ++ 14),这是必需的。请升级您的编译器
config.log内容为:
file D:\projects\qgis\mapnik\SConstruct,line 1266:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config...
pkg-config --atleast-pkgconfig-version=0.15.0
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
'freetype-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for dlfcn.h support ...
.sconf_temp\conftest_2.cpp <-
|
|
|#include <dlfcn.h>
|
|int main()
|{
| return 0;
|}
|
|
clang++-14 /Fo.sconf_temp\conftest_2.obj /c .sconf_temp\conftest_2.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
'clang++-14' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
.sconf_temp\conftest_3.cpp <-
|
|
|int main()
|{
|#if __cplusplus >= 201402L
| return 0;
|#else
| return -1;
|#endif
|}
|
|
clang++-14 /Fo.sconf_temp\conftest_3.obj /c .sconf_temp\conftest_3.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
'clang++-14' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: Checking if compiler (clang++-14) supports -std=c++14 flag...
scons: Configure: (cached) no
如果您看到config.log,则说“'clang ++ -14'不被识别为内部或外部命令”,
为什么它试图使用版本名称运行该命令?如果不是这样,那么我应该如何将版本传递给./configure命令?
我也尝试了G ++(版本6.3.0),并遇到了类似的问题。我以前的叮当声是Visual Studio随附的版本12。当我仅运行./configure时,配置日志说:
file D:\projects\qgis\mapnik\SConstruct,line 1266:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config...
pkg-config --atleast-pkgconfig-version=0.15.0
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
'freetype-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for dlfcn.h support ...
.sconf_temp\conftest_2.cpp <-
|
|
|#include <dlfcn.h>
|
|int main()
|{
| return 0;
|}
|
|
c++ /Fo.sconf_temp\conftest_2.obj /c .sconf_temp\conftest_2.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
c++: error: /Fo.sconf_temp\conftest_2.obj: No such file or directory
c++: error: /c: No such file or directory
c++: error: /TP: No such file or directory
c++: error: /nologo: No such file or directory
c++: error: /D-DMAPNIK_MEMORY_MAPPED_FILE: No such file or directory
c++: error: /Iinclude: No such file or directory
c++: error: /ID:\usr\include: Invalid argument
scons: Configure: no
.sconf_temp\conftest_3.cpp <-
|
|
|int main()
|{
|#if __cplusplus >= 201402L
| return 0;
|#else
| return -1;
|#endif
|}
|
|
c++ /Fo.sconf_temp\conftest_3.obj /c .sconf_temp\conftest_3.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
c++: error: /Fo.sconf_temp\conftest_3.obj: No such file or directory
c++: error: /c: No such file or directory
c++: error: /TP: No such file or directory
c++: error: /nologo: No such file or directory
c++: error: /D-DMAPNIK_MEMORY_MAPPED_FILE: No such file or directory
c++: error: /Iinclude: No such file or directory
c++: error: /ID:\usr\include: Invalid argument
scons: Configure: Checking if compiler (c++) supports -std=c++14 flag...
scons: Configure: (cached) no
当Clang V12不起作用时,我安装了LLVM + Clang V14。我还尝试了首先导出变量,例如导出cxx =“ clang ++ -14”和导出cc =“ clang-14”。但是没有运气... 请提供帮助,因为在过去的两天中,我很严重陷入困境... 谢谢
I followed the steps mentioed in https://mapnik.org/pages/downloads.html to install mapnik from source.
I have clang version 14. But when I am trying to install mapnik on Windows, it says "C++ compiler does not support C++14 standard (-std=c++14), which is required. Please upgrade your compiler"
$ ./configure CXX=clang++-14 CC=clang-14
scons: Reading SConscript files ...
Welcome to Mapnik...
Configuring build environment...
Configuring on Windows in release mode...
Checking for pkg-config... no
Checking for freetype-config... no
Checking for dlfcn.h support ... no
Checking if compiler (clang++-14) supports -std=c++14 flag... (cached) no
C++ compiler does not support C++14 standard (-std=c++14), which is required. Please upgrade your compiler
The config.log contents are:
file D:\projects\qgis\mapnik\SConstruct,line 1266:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config...
pkg-config --atleast-pkgconfig-version=0.15.0
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
'freetype-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for dlfcn.h support ...
.sconf_temp\conftest_2.cpp <-
|
|
|#include <dlfcn.h>
|
|int main()
|{
| return 0;
|}
|
|
clang++-14 /Fo.sconf_temp\conftest_2.obj /c .sconf_temp\conftest_2.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
'clang++-14' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
.sconf_temp\conftest_3.cpp <-
|
|
|int main()
|{
|#if __cplusplus >= 201402L
| return 0;
|#else
| return -1;
|#endif
|}
|
|
clang++-14 /Fo.sconf_temp\conftest_3.obj /c .sconf_temp\conftest_3.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
'clang++-14' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: Checking if compiler (clang++-14) supports -std=c++14 flag...
scons: Configure: (cached) no
If you see config.log, it says "'clang++-14' is not recognized as an internal or external command,"
Why is it trying to run the command with the version name? If this is not the way, how then should I pass the version to ./configure command?
I tried with g++ (version 6.3.0) as well and got similar issues. My previous clang was version 12 that comes with Visual Studio. When I run just ./configure, the config log says:
file D:\projects\qgis\mapnik\SConstruct,line 1266:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config...
pkg-config --atleast-pkgconfig-version=0.15.0
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
'freetype-config' is not recognized as an internal or external command,
operable program or batch file.
scons: Configure: no
scons: Configure: Checking for dlfcn.h support ...
.sconf_temp\conftest_2.cpp <-
|
|
|#include <dlfcn.h>
|
|int main()
|{
| return 0;
|}
|
|
c++ /Fo.sconf_temp\conftest_2.obj /c .sconf_temp\conftest_2.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
c++: error: /Fo.sconf_temp\conftest_2.obj: No such file or directory
c++: error: /c: No such file or directory
c++: error: /TP: No such file or directory
c++: error: /nologo: No such file or directory
c++: error: /D-DMAPNIK_MEMORY_MAPPED_FILE: No such file or directory
c++: error: /Iinclude: No such file or directory
c++: error: /ID:\usr\include: Invalid argument
scons: Configure: no
.sconf_temp\conftest_3.cpp <-
|
|
|int main()
|{
|#if __cplusplus >= 201402L
| return 0;
|#else
| return -1;
|#endif
|}
|
|
c++ /Fo.sconf_temp\conftest_3.obj /c .sconf_temp\conftest_3.cpp /TP -std=c++14 -DU_USING_ICU_NAMESPACE=0 /nologo /D-DMAPNIK_MEMORY_MAPPED_FILE /Iinclude /ID:\usr\include
c++: error: /Fo.sconf_temp\conftest_3.obj: No such file or directory
c++: error: /c: No such file or directory
c++: error: /TP: No such file or directory
c++: error: /nologo: No such file or directory
c++: error: /D-DMAPNIK_MEMORY_MAPPED_FILE: No such file or directory
c++: error: /Iinclude: No such file or directory
c++: error: /ID:\usr\include: Invalid argument
scons: Configure: Checking if compiler (c++) supports -std=c++14 flag...
scons: Configure: (cached) no
When clang v12 didn't work, I installed LLVM + clang v14. I also tried by exporting variables first like export CXX="clang++-14" and export CC="clang-14". But no luck...
Please help as I am badly stuck in this for the past 2 days...
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论