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

compile failed using windows #30

Open
taochen526 opened this issue Jun 17, 2019 · 9 comments
Open

compile failed using windows #30

taochen526 opened this issue Jun 17, 2019 · 9 comments
Labels
good first issue Good for newcomers

Comments

@taochen526
Copy link

I tried to use this library in windows, and I came across the question "error LNK2019:......__declspec(dllimport)". Does anyone know how to solve this problem in windows 10?

@taochen526
Copy link
Author

I have solved the issue by compiling the whole program using visual studio

@alanlukezic
Copy link

Hi @taochen526 , can you give a bit more information about how did you compile (VS version, commands used to compile, etc.) Thanks!

@taochen526
Copy link
Author

Hi @taochen526 , can you give a bit more information about how did you compile (VS version, commands used to compile, etc.) Thanks!

I use the visual studio 2015 to compile the C++/CUDA program all over again to *.pyd format in win 10. It's easy to do using the pybind11. And the compiled pyd file can work well. However, the torch library keeps crashing down and the CUBLAS runtime error keeps happening, I was told that some library was not initialized. So I don't completely solve the issue, and I hope someone can tell me the reason. But you can try my method on your computer, maybe it's just some version problem and I hope I can help you a little bit.

@alanlukezic
Copy link

Thanks a lot @taochen526
I will let you know if I manage to compile and run the code on win10.

@taochen526
Copy link
Author

Thanks a lot @taochen526
I will let you know if I manage to compile and run the code on win10.

Did you successfully solve the issue?

@alanlukezic
Copy link

I was away for a few days so I have not work on this. I am not familiar with pybind11...did you use cmake for compiling? If yes, did you make a cmake script by your own?

@taochen526
Copy link
Author

I was away for a few days so I have not work on this. I am not familiar with pybind11...did you use cmake for compiling? If yes, did you make a cmake script by your own?

I did not use cmake, cause I use vs more in windows, I've updated all the libraries & dependencies these
days, and I'll try again this weekend. I hope it'll work this time.

@vacancy vacancy added the good first issue Good for newcomers label Sep 17, 2019
@flowgrow
Copy link

any update on this?

@taochen526
Copy link
Author

any update on this?

After I updated all the dependet libraries, I finally succesfully recompiled the C/CUDA source code to *.pyd file and it works well now. My working env is win10+vs 2015+pybind11,it's easy to recompile the source code using vs 2015 on win 10, youcan try.

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

No branches or pull requests

4 participants