Closed wang-zuxian closed 8 months ago
4.0.x
BIT7Z_AUTO_FORMAT
v23.01
7z.dll / 7z.so
MSVC
MSVC2015
x86
Windows
Windows10
Build a dll link bit7z.lib with BIT7Z_AUTO_FORMAT then show link error
16:21:57:379 2>bit7z.lib(bitinputarchive.obj) : error LNK2001: 无法解析的外部符号 "class bit7z::BitInFormat const & cdecl bit7z::detect_format_from_extension(class ghc::filesystem::path const &)" (?detect_format_from_extension@bit7z@@YAABVBitInFormat@1@ABVpath@filesystem@ghc@@@Z) 16:21:57:379 2>bit7z.lib(bitinputarchive.obj) : error LNK2001: 无法解析的外部符号 "class bit7z::BitInFormat const & cdecl bit7z::detect_format_from_signature(struct IInStream *)" (?detect_format_from_signature@bit7z@@YAABVBitInFormat@1@PAUIInStream@@@Z) fatal error LNK1120: 2 个无法解析的外部命令
No response
internal/formatdetect.cpp:
change to
then build success. THANKS.
Hi! Thank you for reporting the issue! Yesterday, I pushed a fix to the develop branch. I'll release a new version of bit7z with the fix soon.
develop
Fixed in v4.0.4.
bit7z version
4.0.x
Compilation options
BIT7Z_AUTO_FORMAT
7-zip version
v23.01
7-zip shared library used
7z.dll / 7z.so
Compilers
MSVC
Compiler versions
MSVC2015
Architecture
x86
Operating system
Windows
Operating system versions
Windows10
Bug description
Build a dll link bit7z.lib with BIT7Z_AUTO_FORMAT then show link error
16:21:57:379 2>bit7z.lib(bitinputarchive.obj) : error LNK2001: 无法解析的外部符号 "class bit7z::BitInFormat const & cdecl bit7z::detect_format_from_extension(class ghc::filesystem::path const &)" (?detect_format_from_extension@bit7z@@YAABVBitInFormat@1@ABVpath@filesystem@ghc@@@Z) 16:21:57:379 2>bit7z.lib(bitinputarchive.obj) : error LNK2001: 无法解析的外部符号 "class bit7z::BitInFormat const & cdecl bit7z::detect_format_from_signature(struct IInStream *)" (?detect_format_from_signature@bit7z@@YAABVBitInFormat@1@PAUIInStream@@@Z) fatal error LNK1120: 2 个无法解析的外部命令
Steps to reproduce
No response
Expected behavior
internal/formatdetect.cpp:
ifdef BIT7Z_AUTO_FORMAT
include
include "internal/formatdetect.hpp"
change to
include "internal/formatdetect.hpp"
ifdef BIT7Z_AUTO_FORMAT
include
then build success. THANKS.
Relevant compilation output
No response
Code of Conduct