1

I'd like to invoke PySocketModule_ImportModuleAndAPI function defined in socketmodule.h in my Python C-extension.

Dmitry Trofimov
  • 7,371
  • 1
  • 30
  • 34

2 Answers2

0

Sure. There's even some documentation in the socketmodule.h as to how to do it:

Nathan Binkert
  • 8,744
  • 1
  • 29
  • 37
0

I had a similar problem and resolved it by:

  1. Adding the Modules\ directory (from your Python source) to the C/C++ Additional Include Directories.
  2. #include "socketmodule.h"

Don't know if this is the best solution, but it worked for me!

Nebel22
  • 478
  • 8
  • 17