Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: MSVC2015 build failed with BIT7Z_AUTO_FORMAT #173

Closed
1 task done
wang-zuxian opened this issue Oct 16, 2023 · 2 comments
Closed
1 task done

[Bug]: MSVC2015 build failed with BIT7Z_AUTO_FORMAT #173

wang-zuxian opened this issue Oct 16, 2023 · 2 comments
Assignees
Labels

Comments

@wang-zuxian
Copy link

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

@rikyoz
Copy link
Owner

rikyoz commented Oct 17, 2023

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.

@rikyoz
Copy link
Owner

rikyoz commented Oct 24, 2023

Fixed in v4.0.4.

@rikyoz rikyoz closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants