|
From: David F. <dav...@in...> - 2015-03-31 18:41:42
|
> Additionally, when I do manage to import the module in a Python shell, I don't see any of the functions from the header files when I do dir(steamworks), nor dir(steamworks._steamworks). The header file which is referenced in the interface includes other header files without absolute filesystem positioning (i.e. line 13 is #include "isteamclient.h"), which do exist in the folder where steam_api.h is located; would this be causing this issue?
If your SWIG script is:
%module steamworks
%{
#define SWIG_FILE_WITH_INIT
#include "/Users/aarzee/Documents/steamworks-sdk/public/steam/steam_api.h"
%}
It will do nothing. Lines in the %{ %} block are just inlined in the generated C file.
The SWIG script should be:
%module steamworks
%{
#define SWIG_FILE_WITH_INIT
#include "/Users/aarzee/Documents/steamworks-sdk/public/steam/steam_api.h"
%}
%include "/Users/aarzee/Documents/steamworks-sdk/public/steam/steam_api.h"
The line '%include FILE' asks SWIG to generate wrappers for functions (and
classes, global variables, ...) FILE defines.
--
David Froger
SED-PRO
"C++ may not be the worst programming language ever created, but without a
doubt it’s the worst ever to be taken seriously."
-- Mason Wheeler
|