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

path to lib #2

Closed
seiya-git opened this issue Feb 13, 2018 · 10 comments
Closed

path to lib #2

seiya-git opened this issue Feb 13, 2018 · 10 comments

Comments

@seiya-git
Copy link
Contributor

seiya-git commented Feb 13, 2018

Hi. How to define path to tdlib in windows?

@nodegin
Copy link
Owner

nodegin commented Feb 13, 2018

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
Copy link
Contributor Author

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

@nodegin
Copy link
Owner

nodegin commented Feb 13, 2018

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

@seiya-git
Copy link
Contributor Author

seiya-git commented Feb 13, 2018

64bit (windows and node).

@nodegin
Copy link
Owner

nodegin commented Feb 13, 2018

Are you using 32bit installation of Visual Studio?

@nodegin
Copy link
Owner

nodegin commented Feb 13, 2018

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
Copy link
Contributor Author

seiya-git commented Feb 13, 2018

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

@seiya-git
Copy link
Contributor Author

seiya-git commented Feb 15, 2018

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
Copy link
Owner

nodegin commented Feb 15, 2018

So is your problem solved now?

@seiya-git
Copy link
Contributor Author

Yes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants