”LC.exe” exited with code -1错误的解决办法

本文介绍了解决.net运行时出现的LC.exe exited with code -1错误的方法。通常此错误由编译代码时引用的类错误或licenses.lic文件不匹配引起。文章详细解释了两种常见情况及解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

.net运行时,有时报”LC.exe” exited with code -1错误。对于这个错误,一般来讲,都是由于在进行编译代码的时候,引用的类有错误或不一致,以及引用的类的licenses.lic不正确导致的。
         对于以上两种情况:
                  第一种情况比较容易解决,因为打开项目的引用,能够看到有些引用变成黄色了,重新引用一次就能解决;
                  第二种情况有些复杂,因为引用的类没有出现黄色警告,但每次编译都报”LC.exe” exited with code -1 错误,这时看一下输出,会发现原来LC.exe在执行编译的时候,用到了Properties下面的licenses.lic,由于 licenses.lic不匹配,就导致了错误的发生。
        第二种情况发生的原因分析:由于我原来使用的是06版的Infragistics控件,后来换成09版,虽然安装都正常,但就是编译不能通过。
         解决方法:将Properties下面的licenses.lic文件删除再编译就可以通过了。

PS D:\YOLOV5> pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting gitpython>=3.1.30 (from -r requirements.txt (line 5)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1d/9a/4114a9057db2f1462d5c8f8390ab7383925fe1ac012eaa42402ad65c2963/GitPython-3.1.44-py3-none-any.whl (207 kB) Collecting matplotlib>=3.3 (from -r requirements.txt (line 6)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2f/08/b89867ecea2e305f408fbb417139a8dd941ecf7b23a2e02157c36da546f0/matplotlib-3.10.1.tar.gz (36.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 36.7/36.7 MB 2.4 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [3 lines of output] + meson setup C:\Users\30507\AppData\Local\Temp\pip-install-c4qubktk\matplotlib_c6d574ff2da74d47abcf3071e408894d C:\Users\30507\AppData\Local\Temp\pip-install-c4qubktk\matplotlib_c6d574ff2da74d47 abcf3071e408894d\.mesonpy-wbwy2yc1 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\30507\AppData\Local\Temp\pip-install-c4qubktk\matplotlib_c6d574ff2da74d47abcf3071e408894d\.mesonpy-wbwy2yc1\meson-python-native-file.ini ERROR: Malformed machine file 'C:\\Users\\30507\\AppData\\Local\\Temp\\pip-install-c4qubktk\\matplotlib_c6d574ff2da74d47abcf3071e408894d\\.mesonpy-wbwy2yc1\\meson-python-native-file.ini' failed to parse as unicode: 'utf-8' codec can't decode byte 0xc0 in position 29: invalid start byte [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, n
最新发布
03-23
Microsoft Windows [版本 10.0.22631.4890] (c) Microsoft Corporation。保留所有权利。 C:\Users\LGM>pip install glpk Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple Collecting glpk Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/62/7f/a23262ffe0c8363c242bdc140d5895d96144741edaffc8bcc82e6bc72085/glpk-0.4.8.tar.gz (160 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: glpk Building wheel for glpk (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for glpk (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [11 lines of output] running bdist_wheel running build running build_ext building 'glpk' extension creating build\temp.win-amd64-cpython-313\Release\src "D:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DVERSION_NUMBER=\"\\\"0.4.8\\\"\" "-ID:\develop\Python\Python 3.13.2\include" "-ID:\develop\Python\Python 3.13.2\Include" "-ID:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\include" "-ID:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcsrc\2to3.c /Fobuild\temp.win-amd64-cpython-313\Release\src\2to3.obj 2to3.c "D:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DVERSION_NUMBER=\"\\\"0.4.8\\\"\" "-ID:\develop\Python\Python 3.13.2\include" "-ID:\develop\Python\Python 3.13.2\Include" "-ID:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\include" "-ID:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcsrc\bar.c /Fobuild\temp.win-amd64-cpython-313\Release\src\bar.obj bar.c C:\Users\LGM\AppData\Local\Temp\pip-install-lyopgudc\glpk_61bd5779471d4bf7a2ee00d38b4876cf\src\lp.h(24): fatal error C1083: 无法打开包括文件: “glpk.h”: No such file or directory error: command 'D:\\develop\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for glpk Failed to build glpk ERROR: Failed to build installable wheels for some pyproject.toml based projects (glpk) C:\Users\LGM>
03-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值