mirror of https://github.com/swig/swig
test include within a structure - #1162194
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
01ede93b1c
commit
d277c06bdc
|
@ -14,3 +14,22 @@
|
|||
// Also repeats the test for the import directive in subdirectories
|
||||
|
||||
%include "testdir/test.i"
|
||||
|
||||
|
||||
// Bug #1162194
|
||||
%inline %{
|
||||
typedef struct {
|
||||
#include "inctest.h"
|
||||
} MY_TYPES;
|
||||
|
||||
%}
|
||||
|
||||
%{
|
||||
typedef struct {
|
||||
#include "inctest.h"
|
||||
} MY_THINGS;
|
||||
%}
|
||||
|
||||
typedef struct {
|
||||
%include "inctest.h"
|
||||
} MY_THINGS;
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
import inctest.*;
|
||||
|
||||
public class inctest_runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("inctest");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String argv[])
|
||||
{
|
||||
MY_THINGS things = new MY_THINGS();
|
||||
int i=0;
|
||||
things.setIntegerMember(i);
|
||||
double d = things.getDoubleMember();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue