nodegin/tglib

path to lib

Closed this issue · 10 comments

Hi. How to define path to tdlib in windows?

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',
})

Yes. But I get Error: Dynamic Linking Error: Win32 error 193.

What architecture is your Windows and Node.js? 32bit or 64bit?

64bit (windows and node).

Are you using 32bit installation of Visual Studio?

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.

64bit studio, I have both build for 64bit and 32bit, but same.
tdlib32.zip
tdlib64.zip

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`
});

So is your problem solved now?

Yes. Thanks!