我试图在visual 2015上使用Skia和C++创建一个简单的windows应用程序。我相信我已经创建了skia.lib的静态、共享和发布版本,并链接到了适当的包含文件夹。但是现在我仍然遇到了很多错误,这表明有一个比仅仅链接更大的问题。我尝试将Skia解决方案中的工作HelloWorld项目中的配置属性复制到我自己的配置中,但没有取得任何成功。
在库生成之后,对于让Skia使用VS2015有任何明确的说明吗?如果不是,为什么当我尝试在裸露的模板win32项目中使用Skia时会遇到(许多不同的)问题?是否有更好的方法将属性从一个项目复制到另一个项目?
我对VS和C++还比较陌生。我使用VS2015和C++,因为我正在进行的一个更大项目的其他部分似乎需要这个平台。所以我想我要做的是做一个独立的斯基亚“你好世界”的例子。
对于为as 2015/7构建Skia有一些挫折感。以下是我如何管理我所拥有的,希望它能帮助其他人取得一些进展,同时也能揭示我当前的问题。
作为对Hans的答复,下面是试图构建/out/ solution解决方案时生成的错误。
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/modules/sksg/samples.stamp" exited with code 1. samples ((skia)\(modules)\(sksg)\samples) C:\Users\Me\Documents\skia\out\Release\obj\modules\sksg\samples.vcxproj 64
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ ./sksg.lib" exited with code 1. sksg C:\Users\Me\Documents\skia\out\Release\obj\modules\sksg\sksg.vcxproj 160
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/modules/skottie/tool.stamp" exited with code 1. tool C:\Users\Me\Documents\skia\out\Release\obj\modules\skottie\tool.vcxproj 64
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\gpu\effects\gpu.GrOvalEffect.obj': Permission denied skottie C:\Users\Me\Documents\skia\src\gpu\effects\GrOvalEffect.cpp 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/modules/skottie/skottie.stamp" exited with code 1. skottie C:\Users\Me\Documents\skia\out\Release\obj\modules\skottie\skottie.vcxproj 108
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./lua_pictures.exe" exited with code 1. lua_pictures C:\Users\Me\Documents\skia\out\Release\obj\lua_pictures.vcxproj 66
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\sksl\gpu.SkSLMetalCodeGenerator.obj': Permission denied skshaper C:\Users\Me\Documents\skia\src\sksl\SkSLMetalCodeGenerator.cpp 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/modules/skshaper/skshaper.stamp" exited with code 1. skshaper C:\Users\Me\Documents\skia\out\Release\obj\modules\skshaper\skshaper.vcxproj 64
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\gpu\text\gpu.GrGlyphCache.obj': Permission denied pathops_unittest C:\Users\Me\Documents\skia\src\gpu\text\GrGlyphCache.cpp 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./pathops_unittest.exe" exited with code 1. pathops_unittest C:\Users\Me\Documents\skia\out\Release\obj\pathops_unittest.vcxproj 290
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\sksl\gpu.SkSLParser.obj': Permission denied public_headers_warnings_check C:\Users\Me\Documents\skia\src\sksl\SkSLParser.cpp 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/public_headers_warnings_check.stamp" exited with code 1. public_headers_warnings_check C:\Users\Me\Documents\skia\out\Release\obj\public_headers_warnings_check.vcxproj 64
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\effects\effects.SkTrimPathEffect.obj': Permission denied sk_app C:\Users\Me\Documents\skia\src\effects\SkTrimPathEffect.cpp 1
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\gpu\gl\gpu.GrGLGLSL.obj': Permission denied nanoMech C:\Users\Me\Documents\skia\src\gpu\gl\GrGLGLSL.cpp 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/sk_app.stamp" exited with code 1. sk_app C:\Users\Me\Documents\skia\out\Release\obj\sk_app.vcxproj 88
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./nanoMech.exe" exited with code 1. nanoMech C:\Users\Me\Documents\skia\out\Release\obj\nanoMech.vcxproj 66
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\pdf\pdf.SkPDFUtils.obj': Permission denied skia C:\Users\Me\Documents\skia\src\pdf\SkPDFUtils.cpp 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./skia.lib" exited with code 1. skia C:\Users\Me\Documents\skia\out\Release\obj\skia.vcxproj 1690
Error opening build log: Permission denied skp_parser C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./skp_parser.exe" exited with code 1. skp_parser C:\Users\Me\Documents\skia\out\Release\obj\skp_parser.vcxproj 66
Error opening build log: Permission denied skpMech C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./skpMech.exe" exited with code 1. skpMech C:\Users\Me\Documents\skia\out\Release\obj\skpMech.vcxproj 66
Error opening build log: Permission denied skpinfo C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./skpinfo.exe" exited with code 1. skpinfo C:\Users\Me\Documents\skia\out\Release\obj\skpinfo.vcxproj 66
Error opening build log: Permission denied sktexttopdf C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./sktexttopdf.exe" exited with code 1. sktexttopdf C:\Users\Me\Documents\skia\out\Release\obj\sktexttopdf.vcxproj 66
Error opening build log: Permission denied sse2 C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/sse2.stamp" exited with code 1. sse2 C:\Users\Me\Documents\skia\out\Release\obj\sse2.vcxproj 75
Error opening build log: Permission denied sse41 C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/sse41.stamp" exited with code 1. sse41 C:\Users\Me\Documents\skia\out\Release\obj\sse41.vcxproj 64
Error opening build log: Permission denied sse42 C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/sse42.stamp" exited with code 1. sse42 C:\Users\Me\Documents\skia\out\Release\obj\sse42.vcxproj 64
Error opening build log: Permission denied ssse3 C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/ssse3.stamp" exited with code 1. ssse3 C:\Users\Me\Documents\skia\out\Release\obj\ssse3.vcxproj 69
Error opening build log: Permission denied tests ((skia)\tests) C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/tests.stamp" exited with code 1. tests ((skia)\tests) C:\Users\Me\Documents\skia\out\Release\obj\tests.vcxproj 1405
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./lua_app.exe" exited with code 1. lua_app C:\Users\Me\Documents\skia\out\Release\obj\lua_app.vcxproj 66
Error opening build log: Permission denied Nima-Cpp C:\Users\Me\Documents\skia\out\Release\obj\third_party\Nima-Cpp\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/Nima-Cpp/Nima-Cpp.stamp" exited with code 1. Nima-Cpp C:\Users\Me\Documents\skia\out\Release\obj\third_party\Nima-Cpp\Nima-Cpp.vcxproj 234
Error opening build log: Permission denied expat C:\Users\Me\Documents\skia\out\Release\obj\third_party\expat\ninja 1
Error opening build log: Permission denied harfbuzz C:\Users\Me\Documents\skia\out\Release\obj\third_party\harfbuzz\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/expat/expat.stamp" exited with code 1. expat C:\Users\Me\Documents\skia\out\Release\obj\third_party\expat\expat.vcxproj 70
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/harfbuzz/harfbuzz.stamp" exited with code 1. harfbuzz C:\Users\Me\Documents\skia\out\Release\obj\third_party\harfbuzz\harfbuzz.vcxproj 190
Error opening build log: Permission denied icu C:\Users\Me\Documents\skia\out\Release\obj\third_party\icu\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/icu/icu.stamp" exited with code 1. icu C:\Users\Me\Documents\skia\out\Release\obj\third_party\icu\icu.vcxproj 782
Error opening build log: Permission denied imgui C:\Users\Me\Documents\skia\out\Release\obj\third_party\imgui\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/imgui/imgui.stamp" exited with code 1. imgui C:\Users\Me\Documents\skia\out\Release\obj\third_party\imgui\imgui.vcxproj 70
Error opening build log: Permission denied jsoncpp C:\Users\Me\Documents\skia\out\Release\obj\third_party\jsoncpp\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/jsoncpp/jsoncpp.stamp" exited with code 1. jsoncpp C:\Users\Me\Documents\skia\out\Release\obj\third_party\jsoncpp\jsoncpp.vcxproj 70
Error opening build log: Permission denied libjpeg C:\Users\Me\Documents\skia\out\Release\obj\third_party\libjpeg-turbo\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/libjpeg-turbo/libjpeg.stamp" exited with code 1. libjpeg C:\Users\Me\Documents\skia\out\Release\obj\third_party\libjpeg-turbo\libjpeg.vcxproj 242
Error opening build log: Permission denied libmicrohttpd C:\Users\Me\Documents\skia\out\Release\obj\third_party\libmicrohttpd\ninja 1
Error opening build log: Permission denied libpng C:\Users\Me\Documents\skia\out\Release\obj\third_party\libpng\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/libmicrohttpd/libmicrohttpd.stamp" exited with code 1. libmicrohttpd C:\Users\Me\Documents\skia\out\Release\obj\third_party\libmicrohttpd\libmicrohttpd.vcxproj 98
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/libpng/libpng.stamp" exited with code 1. libpng C:\Users\Me\Documents\skia\out\Release\obj\third_party\libpng\libpng.vcxproj 126
Error opening build log: Permission denied libwebp C:\Users\Me\Documents\skia\out\Release\obj\third_party\libwebp\ninja 1
Error opening build log: Permission denied libwebp_avx2 C:\Users\Me\Documents\skia\out\Release\obj\third_party\libwebp\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/libwebp/libwebp.stamp" exited with code 1. libwebp C:\Users\Me\Documents\skia\out\Release\obj\third_party\libwebp\libwebp.vcxproj 490
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/libwebp/libwebp_avx2.stamp" exited with code 1. libwebp_avx2 C:\Users\Me\Documents\skia\out\Release\obj\third_party\libwebp\libwebp_avx2.vcxproj 62
Error opening build log: Permission denied lua ((skia)\(third_party)\(lua)\lua) C:\Users\Me\Documents\skia\out\Release\obj\third_party\lua\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/lua/lua.stamp" exited with code 1. lua ((skia)\(third_party)\(lua)\lua) C:\Users\Me\Documents\skia\out\Release\obj\third_party\lua\lua.vcxproj 190
Error opening build log: Permission denied libwebp_sse41 C:\Users\Me\Documents\skia\out\Release\obj\third_party\libwebp\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/libwebp/libwebp_sse41.stamp" exited with code 1. libwebp_sse41 C:\Users\Me\Documents\skia\out\Release\obj\third_party\libwebp\libwebp_sse41.vcxproj 74
Error opening build log: Permission denied zlib C:\Users\Me\Documents\skia\out\Release\obj\third_party\zlib\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/zlib/zlib.stamp" exited with code 1. zlib C:\Users\Me\Documents\skia\out\Release\obj\third_party\zlib\zlib.vcxproj 118
Error opening build log: Permission denied zlib_x86 C:\Users\Me\Documents\skia\out\Release\obj\third_party\zlib\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/third_party/zlib/zlib_x86.stamp" exited with code 1. zlib_x86 C:\Users\Me\Documents\skia\out\Release\obj\third_party\zlib\zlib_x86.vcxproj 70
Error opening build log: Permission denied tool_utils C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/tool_utils.stamp" exited with code 1. tool_utils C:\Users\Me\Documents\skia\out\Release\obj\tool_utils.vcxproj 156
Error opening build log: Permission denied typeface_freetype C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/typeface_freetype.stamp" exited with code 1. typeface_freetype C:\Users\Me\Documents\skia\out\Release\obj\typeface_freetype.vcxproj 59
Error opening build log: Permission denied viewer C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./viewer.exe" exited with code 1. viewer C:\Users\Me\Documents\skia\out\Release\obj\viewer.vcxproj 115
Error opening build log: Permission denied webp C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/webp.stamp" exited with code 1. webp C:\Users\Me\Documents\skia\out\Release\obj\webp.vcxproj 72
Error opening build log: Permission denied wuffs C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/wuffs.stamp" exited with code 1. wuffs C:\Users\Me\Documents\skia\out\Release\obj\wuffs.vcxproj 59
Error opening build log: Permission denied xml C:\Users\Me\Documents\skia\out\Release\obj\ninja 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/xml.stamp" exited with code 1. xml C:\Users\Me\Documents\skia\out\Release\obj\xml.vcxproj 80
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\gpu\effects\gpu.GrPorterDuffXferProcessor.obj': Permission denied samples ((skia)\samples) C:\Users\Me\Documents\skia\src\gpu\effects\GrPorterDuffXferProcessor.cpp 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/samples.stamp" exited with code 1. samples ((skia)\samples) C:\Users\Me\Documents\skia\out\Release\obj\samples.vcxproj 454
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\pathops\skia.SkPathWriter.obj': Permission denied Mech C:\Users\Me\Documents\skia\src\pathops\SkPathWriter.cpp 1
Error LNK1104 cannot open file 'obj\src\utils\skia.SkNWayCanvas.obj' fuzz ((skia)\(modules)\(skottie)\fuzz) C:\Users\Me\Documents\skia\out\Release\obj\modules\skottie\LINK 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/modules/skottie/fuzz.stamp" exited with code 1. fuzz ((skia)\(modules)\(skottie)\fuzz) C:\Users\Me\Documents\skia\out\Release\obj\modules\skottie\fuzz.vcxproj 64
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ obj/Mech.stamp" exited with code 1. Mech C:\Users\Me\Documents\skia\out\Release\obj\Mech.vcxproj 536
Error LNK1104 cannot open file 'obj\src\pdf\pdf.SkPDFDevice.obj' tests ((skia)\(modules)\(sksg)\tests) C:\Users\Me\Documents\skia\out\Release\obj\modules\sksg\LINK 1
Error MSB3073 The command "call ninja.exe -C ../../../../../out/Release/ obj/modules/sksg/tests.stamp" exited with code 1. tests ((skia)\(modules)\(sksg)\tests) C:\Users\Me\Documents\skia\out\Release\obj\modules\sksg\tests.vcxproj 64
Error C1083 Cannot open compiler generated file: 'C:\Users\Me\Documents\skia\out\Release\obj\src\ports\skia.SkFontMgr_win_dw.obj': Permission denied skiaserve C:\Users\Me\Documents\skia\src\ports\SkFontMgr_win_dw.cpp 1
Error MSB3073 The command "call ninja.exe -C ../../../out/Release/ ./skiaserve.exe" exited with code 1. skiaserve C:\Users\Me\Documents\skia\out\Release\obj\skiaserve.vcxproj 134 发布于 2018-11-19 03:45:16
我建议不要从视觉演播室开始建造。直接使用忍者的建筑应该能正常工作(我刚试过)。
这两个命令应该为您完成以下任务:
gn gen out\Release
ninja -C out\Release发布于 2021-02-25 23:13:59
对于visual首先构建,您必须为此创建一个解决方案文件。请遵循这些程序,然后您将使用visual构建。
depot_tools,请遵循此链接git clone https://skia.googlesource.com/skia.gitcd D:/skia的源目录python tools/git-sync-depswin_vc = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC"## Execute in the skia directory -> skia\bin
## Directly build Visual Studio's .sln file
> gn gen out/sln --ide=vs现在您可以获得Visual的解决方案文件,然后使用Visual进行构建。
https://stackoverflow.com/questions/53046306
复制相似问题