|
From: Stephen T. <ste...@gm...> - 2011-10-06 18:47:41
|
On Thu, Oct 6, 2011 at 2:38 PM, David Piepgrass
<dpi...@me...> wrote:
>
> No, %{ #define ... %} means that the #define statement is copied into the SWIG-generated wrapper bug ignored by SWIG. Take out the %{ %} part to make it work. Note that windows.i does contain the line...
>
> #define __declspec(WINDOWS_EXTENDED_ATTRIBUTE)
>
> but since you have still not %included dll_defines.hpp, all swig sees is the token "DTED2_EXPORT".
>
Ok. I switched my SWIG interface to the following so that
BUILD_SHARED_WIN32 and dted_EXPORTS were defined. That clears the
syntax error message and gives me a todo list of warnings I need to
wrap or ignore.
%module My_Interface
%{
#include "dted/longitude.hpp"
%}
%include "windows.i"
/// Trying to rename the less than operator in the dted::units namespace
%rename(LonLessThan) operator< ( Longitude const& , Longitude const& );
#define BUILD_SHARED_WIN32
#define dted_EXPORTS
%include "dted/dll_defines.hpp"
%include "dted/longitude.hpp"
I will run with this and if I come across a problem I will reply.
Thanks for the help. I am feeling more confident about using SWIG.
Stephen
|