I'm using Code::Blocks v20.03 in C++17 compatibility mode, and I am trying to link the bit7z 7zip decompression library to my project. I downloaded the latest build of bit7z(bit7z-v4.0.5-mingw8.1.0_x64.7z) and tried to follow the tutorial on the site to link everything. I have the library downloaded to my E:\ drive, and did the usual library linker stuff, but C::B is complaining that it can't find the library.
Here are all my linker and directory settings:
Linker:
-lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2 -lSDL2_mixer -lbit7z -loleaut32
Compiler directory:
E:\SDL2-2.28.5\x86_64-w64-mingw32\include\SDL2
E:\bit7z\include\bit7z
Linker directory:
E:\SDL2-2.28.5\x86_64-w64-mingw32\lib
E:\bit7z\lib
C::B finds SDL2 just fine, so I don't know what I'm doing wrong that it can't find bit7z. Is there some step I've missed?
Tried following the tutorial as close as possible, tried reinstalling bit7z, tried adding 7z.dll.a to the lib folder.
Expected that if I followed the download and install instructions for bit7z, and followed C::B's library link instructions, that it could find the bit7z library.
I found the issue thanks to this thread here with a helpful answer from the library author himself: Unresolved External Symbol while trying to use bit7z library C++ / Qt
I wasn’t linking all the way to the library subdirectory, and I was calling
-lbit7zinstead of-lbit7z64.The following settings fixed my issue:
linker:
Compiler directory:
Linker directory: