pytorch / extension-ffi

Examples of C extensions for PyTorch
258 stars 70 forks source link

[Windows] Error LNK2001, for symbol state in C extension. #17

Closed peterjc123 closed 6 years ago

peterjc123 commented 6 years ago

As reported by @Qinka, there will be an linking error if we build extensions on Windows. It complains about the missing of the variable definition extern THCState *state;. So may I know where this one was defined so as to export it for MSVC? @soumith Otherwise, we may change the example code to C++ since the definition of state can be acquired from ATen.

peterjc123 commented 6 years ago

Since there is cpp-extension now, this one should be closed.