I'm looking for Zip libraries and libzippp looks to be what I want so I'm trying little POC console apps.
This is the first, which works fine in x86 but when I try to compile in x64 I get 'Unresolved External readAsText'.
I used vcpkg to get the libraries
vcpkg install libzippp
vcpkg install libzippp:x64-Windows
Error LNK2019 unresolved external symbol "public: class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl libzippp::ZipEntry::readAsText(enum libzippp::ZipArchive::State,unsigned long)const " (? readAsText@ZipEntry@libzippp@@QEBA ? AV ? $basic_string@DU ? $char_traits@D@std@@V ? $allocator@D@2@@std@@W4State@ZipArchive@2@K@Z) referenced in function main Zip6 D : \rcodeNET\Dev\Zip6\Zip6.obj 1
#include <iostream>
#include "libzippp\libzippp.h"
using namespace std;
using namespace libzippp;
int main()
{
ZipArchive zf("d:\\1zip\\Gender.zcd");
bool ok = zf.open(ZipArchive::ReadOnly);
vector<ZipEntry> entries = zf.getEntries();
ZipEntry ze;
for (int i = 0; i < entries.size(); i++)
{
ze = entries[i];
string name = ze.getName();
int size = ze.getSize();
std::cout << name << "=" << size << "\n";
string textData = ze.readAsText();
std::cout << "text " << textData << "\n";
}
}