lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.13k stars 356 forks source link

Link error in msvc v142 #222

Closed HydrogenC closed 4 years ago

HydrogenC commented 4 years ago

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):

Additional context Add any other context about the problem here.

lc-soft commented 4 years ago

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

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

HydrogenC commented 4 years ago

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

lc-soft commented 4 years ago

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

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

HydrogenC commented 4 years ago

好的,谢谢

HydrogenC commented 4 years ago

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