I am trying too use my C++ class in PHP. in my C++ code I have declared the typedef as:
typedef unsigned char byte;
so I intended to let SWIG consider my typedef in wrapper class, my interface file is something like this:
%module xxx
typedef unsigned char byte;
%include "xxx.h"
....
%{
typedef unsigned char byte;
#include "xxx.h"
%}
and in my test code I refer to type as:
byte *data;
but I've got the following error:
Fatal error: Class 'unsigned_char' not found in xxx.php
P.S: I also include "stdint.i" in my interface file but got the same error
Any ideas?