lc-soft/LCUI

Link error in msvc v142 #222

HydrogenC posted onGitHub

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Compile and link the LCUI example program with MSVC v142

Expected behavior Runs normally.

Screenshots

错误    C1047    对象或库文件“C:\Users\LZMPDev\Downloads\LCUI-2.1.0_x64-windows.lcpkg\lib\LCUIMain.lib”是使用比创建其他对象所用编译器旧的编译器创建的;请重新生成旧的对象和库
C:\Users\LZMPDev\Source\Repos\LCTest\LCTest\LINK    1    

Environment (please complete the following information):

  • LCUI version: 2.1.0
  • Build tools: VS2019
  • OS and version: Win10

Additional context Add any other context about the problem here.


试试安装 v141_xp 工具集,然后修改项目配置,使用此工具集编译项目。

https://github.com/MicrosoftDocs/cpp-docs/issues/1810

posted by lc-soft over 4 years ago

请问LCUI是因为要兼容WinXP而默认使用v141的吗

posted by HydrogenC over 4 years ago

请问LCUI是因为要兼容WinXP而默认使用v141的吗

是的,之前有试过用 vs2017 默认的最新工具集编译,但运行有点问题,所以默认用 v141。

posted by lc-soft over 4 years ago

好的,谢谢

posted by HydrogenC over 4 years ago

禁用全程序优化可以解决此问题。

posted by HydrogenC over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests