Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于编辑器源码在win环境下编译的问题 #123

Open
attix00 opened this issue Sep 23, 2020 · 9 comments
Open

关于编辑器源码在win环境下编译的问题 #123

attix00 opened this issue Sep 23, 2020 · 9 comments

Comments

@attix00
Copy link

attix00 commented Sep 23, 2020

根据官网上的教程,我使用了powershell来编译文件中的cmake_generate_projects.bat,文件,但编译结果如下所示。我的MSBuild确实已经加入到环境变量中,并且在cmd中输入MSBuild也有序列号提示,但依然报错。不知道是不是因为我的VS是2019而其中所要求的是2013还是编辑器只能在linux环境下编译?求大佬赐教

错误提示:
子目录或文件 vs2013 已经存在。
CMake Error at CMakeLists.txt:17 (project):
Failed to run MSBuild command:

MSBuild.exe

to get the value of VCTargetsPath:

用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.6.0+5ff7b0c9e
版权所有(C) Microsoft Corporation。保留所有权利。

生成启动时间为 2020/9/23 22:22:06。
节点 1 上的项目“C:\Users\attix\Desktop\behaviac-master\behaviac-master\build\cmake_binary\vs2013\CMakeFiles\3.18.3\VCTargetsPath.vcxproj”(默认目标)。
E:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(390,5): error MSB8020: 无法找到 Visual Studio 2013 的生成工具(平台工具集 =“v120”)。若要使用 v120 生成工具进行生成,请安装 Visual Studio 2013 生成工具。或者,可以升级到当前 Visual Studio 工具,方式是通过选择“项目”菜单或右键单击该解决方案 ,然后选择“重定解决方案目标”。 [C:\Users\attix\Desktop\behaviac-master\behaviac-master\build\cmake_binary\vs2013\CMakeFiles\3.18.3\VCTargetsPath.vcxproj]
已完成生成项目“C:\Users\attix\Desktop\behaviac-master\behaviac-master\build\cmake_binary\vs2013\CMakeFiles\3.18.3\VCTargetsPath.vcxproj”(默认目标)的操作 - 失败。

生成失败。
@SoftwareKiller
Copy link

解决了吗,我也遇到了这个问题

@attix00
Copy link
Author

attix00 commented Oct 26, 2020

VS版本降到2013

解决了吗,我也遇到了这个问题

@SoftwareKiller
Copy link

SoftwareKiller commented Oct 26, 2020 via email

@attix00
Copy link
Author

attix00 commented Oct 26, 2020

啊?只有这一个解决方案嘛?公司的环境,换一遍还挺麻烦的

------------------ 原始邮件 ------------------ 发件人: "Tencent/behaviac" <notifications@github.com>; 发送时间: 2020年10月26日(星期一) 晚上7:07 收件人: "Tencent/behaviac"<behaviac@noreply.github.com>; 抄送: "小男人╰︶ ̄世态炎凉 ﹏"<378961928@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [Tencent/behaviac] 关于编辑器源码在win环境下编译的问题 (#123) VS版本降到2013 解决了吗,我也遇到了这个问题 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

win下是的,我也没有其他的办法,因为behaviac使用2013版本编的,实在不行可以在Linux上做

@SoftwareKiller
Copy link

SoftwareKiller commented Oct 26, 2020 via email

@attix00
Copy link
Author

attix00 commented Oct 26, 2020

我gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2),跑cmake_generate_projects.sh也会报错,而且Debug和Release的报错还不一样

------------------ 原始邮件 ------------------ 发件人: "Tencent/behaviac" <notifications@github.com>; 发送时间: 2020年10月26日(星期一) 晚上7:11 收件人: "Tencent/behaviac"<behaviac@noreply.github.com>; 抄送: "小男人╰︶ ̄世态炎凉 ﹏"<378961928@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [Tencent/behaviac] 关于编辑器源码在win环境下编译的问题 (#123) 啊?只有这一个解决方案嘛?公司的环境,换一遍还挺麻烦的 … ------------------ 原始邮件 ------------------ 发件人: "Tencent/behaviac" <notifications@github.com>; 发送时间: 2020年10月26日(星期一) 晚上7:07 收件人: "Tencent/behaviac"<behaviac@noreply.github.com>; 抄送: "小男人╰︶ ̄世态炎凉 ﹏"<378961928@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [Tencent/behaviac] 关于编辑器源码在win环境下编译的问题 (#123) VS版本降到2013 解决了吗,我也遇到了这个问题 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. win下是的,我也没有其他的办法,因为behaviac使用2013版本编的,实在不行可以在Linux上做 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

这我就不是很清楚了,我一直用的release,debug好像会超时,我是用的CMake

@SoftwareKiller
Copy link

SoftwareKiller commented Oct 26, 2020 via email

@attix00
Copy link
Author

attix00 commented Oct 26, 2020

是的,CMake和.sh编译下来的错误是一样的,脚本也是调用cmake生成的

------------------ 原始邮件 ------------------ 发件人: "Tencent/behaviac" <notifications@github.com>; 发送时间: 2020年10月26日(星期一) 晚上7:16 收件人: "Tencent/behaviac"<behaviac@noreply.github.com>; 抄送: "小男人╰︶ ̄世态炎凉 ﹏"<378961928@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [Tencent/behaviac] 关于编辑器源码在win环境下编译的问题 (#123) 我gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2),跑cmake_generate_projects.sh也会报错,而且Debug和Release的报错还不一样 … ------------------ 原始邮件 ------------------ 发件人: "Tencent/behaviac" <notifications@github.com>; 发送时间: 2020年10月26日(星期一) 晚上7:11 收件人: "Tencent/behaviac"<behaviac@noreply.github.com>; 抄送: "小男人╰︶ ̄世态炎凉 ﹏"<378961928@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [Tencent/behaviac] 关于编辑器源码在win环境下编译的问题 (#123) 啊?只有这一个解决方案嘛?公司的环境,换一遍还挺麻烦的 … ------------------ 原始邮件 ------------------ 发件人: "Tencent/behaviac" <notifications@github.com>; 发送时间: 2020年10月26日(星期一) 晚上7:07 收件人: "Tencent/behaviac"<behaviac@noreply.github.com>; 抄送: "小男人╰︶ ̄世态炎凉 ﹏"<378961928@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [Tencent/behaviac] 关于编辑器源码在win环境下编译的问题 (#123) VS版本降到2013 解决了吗,我也遇到了这个问题 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. win下是的,我也没有其他的办法,因为behaviac使用2013版本编的,实在不行可以在Linux上做 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. 这我就不是很清楚了,我一直用的release,debug好像会超时,我是用的CMake — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

这我就不是很清楚了,我也是最近才刚刚入门的,可能还要请教高手

@SoftwareKiller
Copy link

使用VS2019的编译问题已经解决,这块是因为2019的编译器版本检测更严格了,在工程提供的CMakeLists.txt加入如下选项就可以解决:
if (MSVC)
add_compile_options("/W3")
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants