I am wondering if anyone knew about this before, and if there is a better way to do it?
c++ header file:
c++ cpp file:
the decls file in userlibs:
the blitz file:
c++ code compiled in visual c++ 2005 express edition.
I am not sure if you can return a c++ class, all I have tried is passing a blitz type into the c++ class.
Lego is the best...
c++ header file:
class test { public: int x,y,z; float a,b; };
c++ cpp file:
#include <stdlib.h> #include <math.h> //the header file #include "testing.h" #define BBDECL extern "C" _declspec(dllexport) #define BBCALL _stdcall BBDECL void BBCALL boo(test* obj) { obj->a = 5.6f; obj->x = 4; obj->y = 5; obj->z = 6; obj->b = 10.9f; }
the decls file in userlibs:
.lib "testing.dll" boo(obj*):"_boo@4"
the blitz file:
Type test Field x,y,z Field a#,b# End Type t.test = New test boo(t) Print(t\a) Print(t\b) Print(t\x) Print(t\y) Print(t\z) waitkey() end
c++ code compiled in visual c++ 2005 express edition.
I am not sure if you can return a c++ class, all I have tried is passing a blitz type into the c++ class.
Lego is the best...