add runme.pl file and missing %init
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8215 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f34ef6ff23
commit
25f12e2784
3 changed files with 19 additions and 2 deletions
|
|
@ -3,11 +3,11 @@ SWIG = $(TOP)/../preinst-swig
|
|||
CXXSRCS = example.cxx
|
||||
TARGET = example
|
||||
INTERFACE = example.i
|
||||
LIBS = -lm
|
||||
LIBS = -lxerces-c -lxerces-depdom -lm
|
||||
|
||||
all::
|
||||
$(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::
|
||||
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
|
||||
|
|
@ -17,3 +17,7 @@ clean::
|
|||
$(MAKE) -f $(TOP)/Makefile perl5_clean
|
||||
|
||||
check: all
|
||||
|
||||
|
||||
run:
|
||||
perl runme.pl
|
||||
|
|
|
|||
7
SWIG/Examples/perl5/xmlstring/runme.pl
Normal file
7
SWIG/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>
|
||||
%typemaps_string(XMLCh, XMLCh,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue