path to lib
Closed this issue · 10 comments
seiya-git commented
Hi. How to define path to tdlib in windows?
nodegin commented
Hi, I didn't test it on Windows, but have you tried to define binaryPath
option in client constructor?
e.g.:
const client = new Client({
...options,
binaryPath: './libtdjson',
})
seiya-git commented
Yes. But I get Error: Dynamic Linking Error: Win32 error 193
.
nodegin commented
What architecture is your Windows and Node.js? 32bit or 64bit?
seiya-git commented
64bit (windows and node).
nodegin commented
Are you using 32bit installation of Visual Studio?
nodegin commented
I tried to build tdlib on Windows but no luck. To make your life easier I suggest you build and run tdlib on Linux / macOS.
seiya-git commented
64bit studio, I have both build for 64bit and 32bit, but same.
tdlib32.zip
tdlib64.zip
seiya-git commented
It's not detect required dll (zlib) if it not in same folder as script
dirty hack:
const binPath = path.normalize(`${__dirname}/tdlib64/`);
process.env.Path += `;${binPath}`;
const client = new Client({
...options,
binaryPath: `${binPath}/tdjson.dll`
});
nodegin commented
So is your problem solved now?
seiya-git commented
Yes. Thanks!