GenericAlias
GenericAlias

Reputation: 445

SWIG: %ignore keeps giving "Syntax error in input(1)"

Forgive me if this question is silly, but I can't find a good example of %ignore being used around the web. I'm trying to generate a python wrapper for C++ code using the following command:

swig -python -c++ sample.i

I have an interface file like the following:

%module sample
%{
#include <file1.h>
#include <file2.h>
%}

%ignore vprint
%include <file1.h>
%include <file2.h>
%include <file3.h>

I'm trying to exclude the vprint function, defined in file1.h, because it takes in a va_list as a parameter, which SWIG doesn't support the wrapping of. When I include the %ignore statement, I get an error stating "Syntax error in input(1)". Without it, I get the normal error telling me I can't wrap the function I'm trying to ignore. Why might this error be occurring? Thanks in advance!

Upvotes: 1

Views: 1781

Answers (1)

m7thon
m7thon

Reputation: 3043

You certainly need a semicolon after the %ignore:

%ignore vprint;

Upvotes: 4

Related Questions