-
Notifications
You must be signed in to change notification settings - Fork 55
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
Code issues when building w/ win32 threads #73
Comments
Looks like there's an outstanding Pull Request #21 from last year that fixes most of the problems I've encountered above. Why hasn't this been merged into the master branch yet? |
Has Question solved?@greatwolf ,i have encounted a same problems in windows platform |
@honghuCode unfortunately no, I haven't heard anything back from the torch maintainers yet. :( |
If you could rebase #21 to on top of master, i can merge |
It appears there are quite a few problems with the latest head resulting in a broken build when compiling under windows. Here are the issues I've encountered so far in no particular order:
USE_WIN32_THREADS
but the CMake file actually definesUSE_WIN_THREADS=1
causing incorrect preprocessing. This is easily fixed by changing one of them to match.restrict
keyword is a c99 feature but THThread.c is being compiled without using-std=c99
resulting in errors.THREAD_FUNCTION
isn't defined anywhere butpthread_create
attempts to cast into it nonetheless resulting in compile errors. According to MSDN_beginthreadex
needsunsigned ( __stdcall *start_address )( void * )
for the 3rd argument. PerhapsTHREAD_FUNCTION
should be defined to that?#include <dlfcn.h>
but that header doesn't exist under windows. Not sure what the fix should be here.Please advise on how best to address the above issues.
Thanks
The text was updated successfully, but these errors were encountered: