add runme.pl file and missing %init
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8215 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c8d5ba81eb
commit
4c7f4ea9f7
3 changed files with 19 additions and 2 deletions
|
|
@ -3,11 +3,11 @@ SWIG = $(TOP)/../preinst-swig
|
||||||
CXXSRCS = example.cxx
|
CXXSRCS = example.cxx
|
||||||
TARGET = example
|
TARGET = example
|
||||||
INTERFACE = example.i
|
INTERFACE = example.i
|
||||||
LIBS = -lm
|
LIBS = -lxerces-c -lxerces-depdom -lm
|
||||||
|
|
||||||
all::
|
all::
|
||||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5_cpp
|
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' LIBS=$(LIBS) CXX="g++ -g3" perl5_cpp
|
||||||
|
|
||||||
static::
|
static::
|
||||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||||
|
|
@ -17,3 +17,7 @@ clean::
|
||||||
$(MAKE) -f $(TOP)/Makefile perl5_clean
|
$(MAKE) -f $(TOP)/Makefile perl5_clean
|
||||||
|
|
||||||
check: all
|
check: all
|
||||||
|
|
||||||
|
|
||||||
|
run:
|
||||||
|
perl runme.pl
|
||||||
|
|
|
||||||
7
Examples/perl5/xmlstring/runme.pl
Normal file
7
Examples/perl5/xmlstring/runme.pl
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
use example;
|
||||||
|
|
||||||
|
|
||||||
|
$e1 = new example::XMLChTest();
|
||||||
|
$e1->set("hello");
|
||||||
|
print $e1->get(),"\n";
|
||||||
|
|
||||||
|
|
@ -93,6 +93,12 @@ SWIG_FromXMLChPtrAndSize(const XMLCh* input, size_t size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%init {
|
||||||
|
if (!SWIG_UTF8Transcoder()) {
|
||||||
|
croak("ERROR: XML::Xerces: INIT: Could not create UTF-8 transcoder");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
%include <typemaps/strings.swg>
|
%include <typemaps/strings.swg>
|
||||||
%typemaps_string(XMLCh, XMLCh,
|
%typemaps_string(XMLCh, XMLCh,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue