Closed srelay1234 closed 3 years ago
使用 Microsoft Visual Studio 14.0 命令提示符,执行下出错的命令: cl.exe "-nologo" "-MD" "-O2" "-Brepro" "-I" "./src" "-I" "./src/osg" "-Zi" "-Gm" "-INCREMENTAL" "-DWIN32" "-D_WINDOWS" "-o D:\3dtiles_git\3dtiles\target\release\build_3dtile-d3ba7728c41c4069\out./src/osgb23dtile.o" "-c" "./src/osgb23dtile.cpp"
看看什么错误
cl.exe "-nologo" "-MD" "-O2" "-Brepro" "-I" "./src" "-I" "./src/osg" "-Zi" "-Gm" "-INCREMENTAL" "-DWIN32" "-D_WINDOWS" "-o D:\3dtiles_git\3dtiles\target\release\build_3dtile-d3ba7728c41c4069\out./src/osgb23dtile.o" "-c" "./src/osgb23dtile.cpp" 执行命令后,结果:
cl: 命令行 warning D9035 :“o”选项已否决,并将在将来的版本中移除 osgb23dtile.cpp ./src/osgb23dtile.cpp: warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xlocale(341): warning C4530: 使用了 C++ 异常处理程序,但 未启用展开语义。请指定 /EHsc ./src/osgb23dtile.cpp(770): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以 防止数据丢失 ./src/osgb23dtile.cpp(859): error C2065: “sence”: 未声明的标识符 ./src/osgb23dtile.cpp(859): error C2228: “.nodes”的左边必须有类/结构/联合 ./src/osgb23dtile.cpp(859): note: 类型是“unknown-type” ./src/osgb23dtile.cpp(859): error C2228: “.push_back”的左边必须有类/结构/联合 ./src/osgb23dtile.cpp(880): error C2065: “baseColorTexture”: 未声明的标识符 ./src/osgb23dtile.cpp(880): error C2228: “.json_int_value”的左边必须有类/结构/联合 ./src/osgb23dtile.cpp(880): note: 类型是“unknown-type” ./src/osgb23dtile.cpp(881): error C2065: “baseColorTexture”: 未声明的标识符 ./src/osgb23dtile.cpp(1246): error C2065: “in”: 未声明的标识符 ./src/osgb23dtile.cpp(1248): error C2059: 语法错误:“if” ./src/osgb23dtile.cpp(1249): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int ./src/osgb23dtile.cpp(1249): error C2371: “ret”: 重定义;不同的基类型 ./src/osgb23dtile.cpp(1247): note: 参见“ret”的声明 ./src/osgb23dtile.cpp(1249): error C2065: “out”: 未声明的标识符 ./src/osgb23dtile.cpp(1250): error C2059: 语法错误:“if” ./src/osgb23dtile.cpp(1251): error C2059: 语法错误:“return” ./src/osgb23dtile.cpp(1252): error C2059: 语法错误:“}” ./src/osgb23dtile.cpp(1252): error C2143: 语法错误: 缺少“;”(在“}”的前面)
会 C++ 吗? 自己排查一下看看?
cl.exe "-nologo" "-MD" "-O2" "-Brepro" "-I" "./src" "-I" "./src/osg" "-Zi" "-Gm" "-INCREMENTAL" "-DWIN32" "-D_WINDOWS" "-o D:\3dtiles_git\3dtiles\target\release\build_3dtile-d3ba7728c41c4069\out./src/osgb23dtile.o" "-c" "./src/osgb23dtile.cpp" 执行命令后,结果:
cl: 命令行 warning D9035 :“o”选项已否决,并将在将来的版本中移除 osgb23dtile.cpp ./src/osgb23dtile.cpp: warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xlocale(341): warning C4530: 使用了 C++ 异常处理程序,但 未启用展开语义。请指定 /EHsc ./src/osgb23dtile.cpp(770): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以 防止数据丢失 ./src/osgb23dtile.cpp(859): error C2065: “sence”: 未声明的标识符 ./src/osgb23dtile.cpp(859): error C2228: “.nodes”的左边必须有类/结构/联合 ./src/osgb23dtile.cpp(859): note: 类型是“unknown-type” ./src/osgb23dtile.cpp(859): error C2228: “.push_back”的左边必须有类/结构/联合 ./src/osgb23dtile.cpp(880): error C2065: “baseColorTexture”: 未声明的标识符 ./src/osgb23dtile.cpp(880): error C2228: “.json_int_value”的左边必须有类/结构/联合 ./src/osgb23dtile.cpp(880): note: 类型是“unknown-type” ./src/osgb23dtile.cpp(881): error C2065: “baseColorTexture”: 未声明的标识符 ./src/osgb23dtile.cpp(1246): error C2065: “in”: 未声明的标识符 ./src/osgb23dtile.cpp(1248): error C2059: 语法错误:“if” ./src/osgb23dtile.cpp(1249): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int ./src/osgb23dtile.cpp(1249): error C2371: “ret”: 重定义;不同的基类型 ./src/osgb23dtile.cpp(1247): note: 参见“ret”的声明 ./src/osgb23dtile.cpp(1249): error C2065: “out”: 未声明的标识符 ./src/osgb23dtile.cpp(1250): error C2059: 语法错误:“if” ./src/osgb23dtile.cpp(1251): error C2059: 语法错误:“return” ./src/osgb23dtile.cpp(1252): error C2059: 语法错误:“}” ./src/osgb23dtile.cpp(1252): error C2143: 语法错误: 缺少“;”(在“}”的前面)
vs2015 是 update 3 吗?
按照步骤 1、git clone https://github.com/fanvanzh/3dtiles.git,没有问题
2、cargo build --release,这一步,如果设置config代理,直接错误提示: error: failed to parse manifest at
D:\3dtiles_git\3dtiles\Cargo.toml
Caused by: the
registry.index
config value is no longer supported Use[source]
replacement to alter the default index for crates.io.3、删除config代理,再次运行cargo build --release,结果: Updating crates.io index Downloaded bitflags v1.2.1 Downloaded aho-corasick v0.7.13 Downloaded env_logger v0.5.13 Downloaded crossbeam-utils v0.7.2 Downloaded quick-error v1.2.3 ... Compiling crossbeam-deque v0.7.3 Compiling clap v2.33.3 Compiling termcolor v1.1.0 Compiling chrono v0.4.15 Compiling env_logger v0.5.13 Compiling _3dtile v0.1.0 (D:\3dtiles_git\3dtiles) error: failed to run custom build command for
_3dtile v0.1.0 (D:\3dtiles_git\3dtiles)
Caused by: process didn't exit successfully:
D:\3dtiles_git\3dtiles\target\release\build\_3dtile-08a20fc9408c7c68\build-script-build
(exit code: 1) --- stderrerror occurred: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-I" "./src" "-I" "./src/osg" "-Zi" "-Gm" "-INCREMENTAL" "-DWIN32" "-D_WINDOWS" "-FoD:\3dtiles_git\3dtiles\target\release\build\_3dtile-d3ba7728c41c4069\out\./src/osgb23dtile.o" "-c" "./src/osgb23dtile.cpp" with args "cl.exe" did not execute successfully (status code exit code: 2).
warning: build failed, waiting for other jobs to finish... error: build failed
不知道怎么修改错误?