【Bug笔记】sumatrapdf下载最新版本VS2017专业版编译的时候报错

本人在开源代码sumatrapdf里面下载最新的代码进行编译,本机下载最先专业版VS2017进行运行,不过老是编译运行报错,我在开源网站想作者咨询。

版本:https://github.com/sumatrapdfreader/sumatrapdf

问题:https://github.com/sumatrapdfreader/sumatrapdf/issues/1031

Please help me. When I download the latest version(sumatrapdf-master.zip), I use VS2017 to run the wrong report.My laptop win10 64 bit,When I unzip the file, open vs2017/SumatraPDF.sln, compile and run error.
----------------------------------ERROR-----------------------------------------------------------
Severity code indicates that item file rows are forbidden to display state.
Error MSB8020 could not find the v141_xp generation tool (platform toolset = "v141_xp"). If you want to use the v141_xp generation tool to generate, install the v141_xp generation tool. Or, you can upgrade to the current Visual Studio tool by selecting the "project" menu or right-click the solution, and then selecting the "redefine solution target". Cmapdump D:\Program\VisualStudio2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets 57

I hope you can teach me how to run it, compile those files, and guide me according to your successful compilation. Thank you.


kjk回答:您很可能需要重新运行Visual Studio安装程序,并确保安装XP工具链组件。

当我重新安装VS2017把XP的安装上,重新运行,不过还是有报错:

Today,when i re-run Visual Studio installer and make sure to install XP toolchain component.
----------------------------------ERROR-----------------------------------------------------------
1>------ Build started: Project: synctex, Configuration: Debug x64 ------
2>------ Build started: Project: mupdf, Configuration: Debug x64 ------
1>synctex_parser.c
1>d:\sumatrapdf-master\ext\synctex\synctex_parser.c(715): error C2220: warning treated as error - no 'object' file generated
1>d:\sumatrapdf-master\ext\synctex\synctex_parser.c(715): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
1>Done building project "synctex.vcxproj" -- FAILED.
2>pdf-write.c
2>d:\sumatrapdf-master\mupdf\source\pdf\pdf-write.c(2075): error C2220: warning treated as error - no 'object' file generated
2>d:\sumatrapdf-master\mupdf\source\pdf\pdf-write.c(2075): warning C4819: The file contains a character that cannot be represented in the current code page (0). Save the file in Unicode format to prevent data loss
2>Done building project "mupdf.vcxproj" -- FAILED.
3>------ Build started: Project: SumatraPDF, Configuration: Debug x64 ------
3>LINK : fatal error LNK1104: cannot open file 'D:\sumatrapdf-master\dbg64\mupdf.lib'
3>Done building project "SumatraPDF.vcxproj" -- FAILED.
========== Build: 0 succeeded, 3 failed, 16 up-to-date, 0 skipped ==========

How is this going?

kjk回答:修改pdf-write.c第2075行的代码,然后synctex_parser.c从新保存一下文件就可以了

pdf-write.c
row 2075
//fprintf(opts->out, "%%\316\274\341\277\246\n\n"); //wrong

fprintf(opts->out, "%%\xC2\xB5\xC2\xB6\n\n"); //ok---come from mupdf-1.12.0-source

You can disable that warning. It's caused by using non-english OS.

重新运行,终于可以了,最新本部3.2



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

掘金者说

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值