cross-DLL 问题
时间: 2023-10-09 21:10:20 浏览: 139
Cross-DLL问题是指在使用多个动态链接库(DLL)的程序中,不同的DLL之间出现了一些无法直接访问彼此的问题。这通常是由于在不同的DLL中定义了相同的全局变量或者函数等导致的。
为了解决这个问题,可以采用以下方法:
1. 将相同的变量或者函数定义放在一个独立的DLL中,在其他DLL中通过调用这个DLL来访问这些变量或者函数。
2. 将相同的变量或者函数定义为静态的,这样它们就只会在定义它们的DLL中可见,不会被其他DLL访问。
3. 将不同的DLL之间需要访问的变量或者函数定义为可导出的,这样其他DLL就可以直接访问它们。
4. 在访问其他DLL中的变量或者函数时,使用间接寻址方式,例如通过函数指针或者回调函数等。
需要根据具体的情况分析和解决问题,确保不同的DLL之间能够正确地协同工作。
相关问题
36085 WARNING: lib not found: c10.dll dependency of D:\python\lib\site-packages\torchvision\_C.pyd 36099 WARNING: lib not found: torch_cpu.dll dependency of D:\python\lib\site-packages\torchvision\_C.pyd 36113 WARNING: lib not found: c10_cuda.dll dependency of D:\python\lib\site-packages\torchvision\_C.pyd 36127 WARNING: lib not found: torch_cuda_cpp.dll dependency of D:\python\lib\site-packages\torchvision\_C.pyd 36146 WARNING: lib not found: torch_python.dll dependency of D:\python\lib\site-packages\torch\_C_flatbuffer.cp37-win_amd64.pyd 36287 WARNING: lib not found: torch_python.dll dependency of D:\python\lib\site-packages\torch\_C.cp37-win_amd64.pyd 37214 WARNING: lib not found: api-ms-win-security-systemfunctions-l1-1-0.dll dependency of D:\python\lib\site-packages\torchvision\cudart64_110.dll 326321 INFO: Looking for eggs 326578 INFO: Using Python library D:\python\python37.dll 326578 INFO: Found binding redirects: [] 326631 INFO: Warnings written to D:\python-zuoye\pythonProject_001\build\main\warn-main.txt 327409 INFO: Graph cross-reference written to D:\python-zuoye\pythonProject_001\build\main\xref-main.html 327899 INFO: checking PYZ 327900 INFO: Building PYZ because PYZ-00.toc is non existent 327901 INFO: Building PYZ (ZlibArchive) D:\python-zuoye\pythonProject_001\build\main\PYZ-00.pyz 334452 INFO: Building PYZ (ZlibArchive) D:\python-zuoye\pythonProject_001\build\main\PYZ-00.pyz completed successfully. 334974 INFO: checking PKG 334974 INFO: Building PKG because PKG-00.toc is non existent 334975 INFO: Building PKG (CArchive) main.pkg
这个警告信息看起来像是在使用torchvision和torch库时,找不到相关的依赖库。其中,c10.dll, torch_cpu.dll, c10_cuda.dll, torch_cuda_cpp.dll, torch_python.dll 这些库都是与pytorch相关的依赖库。api-ms-win-security-systemfunctions-l1-1-0.dll是Windows系统的API库。
您可以尝试重新安装最新版本的pytorch和torchvision库,并确保您的环境变量已正确配置。如果您使用的是Windows系统,可以尝试安装 Microsoft Visual C++ Redistributable for Visual Studio 2019,它包括了一些必要的系统dll文件。如果问题依然存在,您可以在pytorch或torchvision的官方论坛上提问,寻求帮助。
290103 INFO: Looking for eggs 290104 INFO: Using Python library C:\Users\GOD\AppData\Local\Programs\Python\Python310\python310.dll 290107 INFO: Found binding redirects: [] 290192 INFO: Warnings written to D:\work\chuanqi\build\main\warn-main.txt 291742 INFO: Graph cross-reference written to D:\work\chuanqi\build\main\xref-main.html 292930 INFO: checking PYZ 292931 INFO: Building PYZ because PYZ-00.toc is non existent 292932 INFO: Building PYZ (ZlibArchive) D:\work\chuanqi\build\main\PYZ-00.pyz 305821 INFO: Building PYZ (ZlibArchive) D:\work\chuanqi\build\main\PYZ-00.pyz completed successfully. 306174 INFO: checking PKG 306174 INFO: Building PKG because PKG-00.toc is non existent 306177 INFO: Building PKG (CArchive) main.pkg
这是一个关于Python程序打包的输出信息。在这个过程中,Python程序会被转换成一个独立的可执行文件,方便在其他机器上运行。在这个输出信息中,可以看到程序正在被打包成一个PYZ(Python Zip)文件和一个PKG(Package)文件。打包完成后,PYZ和PKG文件可以在其他机器上运行,而不需要安装Python环境。
阅读全文
相关推荐
















