summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--CHANGES6
-rw-r--r--CHANGES.current29
-rw-r--r--Doc/Devel/internals.html4
-rw-r--r--Doc/Devel/tree.html2
-rw-r--r--Doc/Manual/Allegrocl.html18
-rw-r--r--Doc/Manual/Android.html26
-rw-r--r--Doc/Manual/CSharp.html2
-rw-r--r--Doc/Manual/Extending.html14
-rw-r--r--Doc/Manual/Introduction.html2
-rw-r--r--Doc/Manual/Java.html9
-rw-r--r--Doc/Manual/Lisp.html2
-rw-r--r--Doc/Manual/Lua.html4
-rw-r--r--Doc/Manual/Modula3.html8
-rw-r--r--Doc/Manual/Modules.html2
-rw-r--r--Doc/Manual/Ocaml.html4
-rw-r--r--Doc/Manual/Octave.html2
-rw-r--r--Doc/Manual/Perl5.html4
-rw-r--r--Doc/Manual/Python.html13
-rw-r--r--Doc/Manual/Ruby.html20
-rw-r--r--Doc/Manual/SWIGPlus.html2
-rw-r--r--Doc/Manual/Scripting.html7
-rw-r--r--Doc/Manual/Tcl.html12
-rw-r--r--Examples/Makefile.in2
-rw-r--r--Examples/README12
-rw-r--r--Examples/android/class/jni/example.cpp8
-rw-r--r--Examples/android/class/jni/example.h20
-rw-r--r--Examples/chicken/class/example.h25
-rw-r--r--Examples/chicken/class/example.i1
-rw-r--r--Examples/csharp/arrays/example-cs.csproj90
-rw-r--r--Examples/csharp/arrays/example-vc.vcproj415
-rw-r--r--Examples/csharp/arrays/example.sln38
-rw-r--r--Examples/csharp/callback/example-cs.csproj187
-rw-r--r--Examples/csharp/callback/example-vc.vcproj387
-rw-r--r--Examples/csharp/callback/example.sln44
-rw-r--r--Examples/csharp/class/example-cs.csproj193
-rw-r--r--Examples/csharp/class/example-vc.vcproj383
-rw-r--r--Examples/csharp/class/example.h25
-rw-r--r--Examples/csharp/class/example.i1
-rw-r--r--Examples/csharp/class/example.sln44
-rw-r--r--Examples/csharp/enum/example-cs.csproj187
-rw-r--r--Examples/csharp/enum/example-vc.vcproj383
-rw-r--r--Examples/csharp/enum/example.sln44
-rw-r--r--Examples/csharp/extend/example-cs.csproj193
-rw-r--r--Examples/csharp/extend/example-vc.vcproj387
-rw-r--r--Examples/csharp/extend/example.sln44
-rw-r--r--Examples/csharp/funcptr/example-cs.csproj181
-rw-r--r--Examples/csharp/funcptr/example-vc.vcproj385
-rw-r--r--Examples/csharp/funcptr/example.sln44
-rw-r--r--Examples/csharp/reference/example-cs.csproj187
-rw-r--r--Examples/csharp/reference/example-vc.vcproj383
-rw-r--r--Examples/csharp/reference/example.sln44
-rw-r--r--Examples/csharp/simple/example-cs.csproj175
-rw-r--r--Examples/csharp/simple/example-vc.vcproj211
-rw-r--r--Examples/csharp/simple/example.sln18
-rw-r--r--Examples/csharp/template/example-cs.csproj199
-rw-r--r--Examples/csharp/template/example-vc.vcproj382
-rw-r--r--Examples/csharp/template/example.sln44
-rw-r--r--Examples/csharp/variables/example-cs.csproj187
-rw-r--r--Examples/csharp/variables/example-vc.vcproj386
-rw-r--r--Examples/csharp/variables/example.sln44
-rw-r--r--Examples/d/class/example.h18
-rw-r--r--Examples/d/class/example.i1
-rw-r--r--Examples/go/class/example.h25
-rw-r--r--Examples/go/class/example.i1
-rw-r--r--Examples/go/template/index.html2
-rw-r--r--Examples/guile/class/example.h18
-rwxr-xr-x[-rw-r--r--]Examples/guile/matrix/runme.scm0
-rw-r--r--Examples/java/class/example.cxx10
-rw-r--r--Examples/java/class/example.h25
-rw-r--r--Examples/java/class/example.i1
-rw-r--r--Examples/java/class/index.html49
-rw-r--r--Examples/java/template/index.html2
-rw-r--r--Examples/lua/class/example.h25
-rw-r--r--Examples/lua/class/example.i1
-rw-r--r--Examples/lua/embed2/embed2.c6
-rw-r--r--Examples/lua/embed3/embed3.cpp17
-rw-r--r--Examples/lua/import.lua8
-rw-r--r--Examples/modula3/class/example.h44
-rw-r--r--Examples/octave/class/example.h18
-rw-r--r--Examples/perl5/class/example.cxx10
-rw-r--r--Examples/perl5/class/example.h29
-rw-r--r--Examples/perl5/class/example.i2
-rw-r--r--Examples/perl5/class/index.html87
-rw-r--r--Examples/perl5/class/runme.pl2
-rw-r--r--Examples/php/class/example.cxx23
-rw-r--r--Examples/php/class/example.h16
-rw-r--r--Examples/php/class/example.i1
-rw-r--r--Examples/php/class/runme.php4
-rw-r--r--Examples/pike/class/example.cxx32
-rw-r--r--Examples/pike/class/example.h31
-rw-r--r--Examples/pike/class/example.i1
-rw-r--r--Examples/python/callback/runme.py2
-rw-r--r--Examples/python/class/example.cxx10
-rw-r--r--Examples/python/class/example.h25
-rw-r--r--Examples/python/class/example.i1
-rw-r--r--Examples/python/class/index.html87
-rw-r--r--Examples/python/class/runme.py4
-rw-r--r--Examples/python/index.html3
-rw-r--r--Examples/python/multimap/example.i2
-rw-r--r--Examples/r/class/example.h25
-rw-r--r--Examples/r/class/example.i6
-rw-r--r--Examples/ruby/class/example.cxx10
-rw-r--r--Examples/ruby/class/example.h25
-rw-r--r--Examples/ruby/class/example.i1
-rw-r--r--Examples/ruby/class/index.html61
-rw-r--r--Examples/ruby/class/runme.rb4
-rw-r--r--Examples/ruby/index.html2
-rw-r--r--Examples/tcl/class/example.cxx10
-rw-r--r--Examples/tcl/class/example.h25
-rw-r--r--Examples/tcl/class/example.i2
-rw-r--r--Examples/tcl/class/index.html50
-rw-r--r--Examples/test-suite/chicken/Makefile.in6
-rw-r--r--Examples/test-suite/common.mk4
-rw-r--r--Examples/test-suite/csharp/Makefile.in4
-rw-r--r--Examples/test-suite/d/Makefile.in4
-rw-r--r--Examples/test-suite/errors/swig_fragment_missing.i4
-rw-r--r--Examples/test-suite/errors/swig_fragment_missing.stderr1
-rw-r--r--Examples/test-suite/java/Makefile.in4
-rw-r--r--Examples/test-suite/java/README2
-rw-r--r--Examples/test-suite/lua/import.lua6
-rw-r--r--Examples/test-suite/lua/keyword_rename_runme.lua10
-rw-r--r--Lib/allkw.swg1
-rw-r--r--Lib/chicken/chickenrun.swg4
-rw-r--r--Lib/csharp/csharp.swg14
-rw-r--r--Lib/d/dmemberfunctionpointers.swg14
-rw-r--r--Lib/java/java.swg14
-rw-r--r--Lib/lua/lua.swg3
-rw-r--r--Lib/lua/luakw.swg67
-rw-r--r--Lib/lua/luaruntime.swg2
-rw-r--r--Lib/ocaml/swigp4.ml (renamed from Lib/ocaml/swigp4.ml.in)0
-rw-r--r--Lib/octave/octcontainer.swg4
-rw-r--r--Lib/octave/octtypemaps.swg2
-rw-r--r--Lib/perl5/Makefile.in2
-rw-r--r--Lib/perl5/director.swg1
-rw-r--r--Lib/perl5/perltypemaps.swg2
-rw-r--r--Lib/perl5/std_list.i4
-rw-r--r--Lib/perl5/std_map.i4
-rw-r--r--Lib/perl5/std_vector.i4
-rw-r--r--Lib/python/director.swg1
-rw-r--r--Lib/python/pycontainer.swg4
-rw-r--r--Lib/python/pyrun.swg6
-rw-r--r--Lib/ruby/rubycontainer.swg4
-rw-r--r--Lib/ruby/rubytypemaps.swg2
-rw-r--r--Lib/std/std_common.i6
-rw-r--r--Lib/std/std_map.i4
-rw-r--r--Lib/std/std_unordered_map.i4
-rw-r--r--Lib/swig.swg2
-rw-r--r--Lib/swiginit.swg2
-rw-r--r--Lib/swigrun.swg24
-rw-r--r--Lib/tcl/std_map.i4
-rw-r--r--Lib/tcl/std_vector.i4
-rw-r--r--Lib/typemaps/exception.swg6
-rw-r--r--Lib/typemaps/fragments.swg8
-rw-r--r--Lib/typemaps/traits.swg4
-rw-r--r--Makefile.in2
-rw-r--r--Source/CParse/parser.y5
-rw-r--r--Source/CParse/templ.c2
-rw-r--r--Source/Modules/typepass.cxx2
-rw-r--r--Source/Swig/fragment.c10
-rw-r--r--Source/Swig/typeobj.c2
-rw-r--r--configure.ac59
162 files changed, 4969 insertions, 2427 deletions
diff --git a/.gitignore b/.gitignore
index eb3aa012c..48826d914 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,7 @@
*.class
# Editor files and various other junk
-*.sw?
+.*.sw?
*.bak
# Local PCRE
@@ -67,7 +67,6 @@ Examples/Makefile
Examples/guile/Makefile
Examples/test-suite/*/Makefile
Examples/xml/Makefile
-Lib/ocaml/swigp4.ml
/Makefile
Source/Include/stamp-h1
Source/Include/swigconfig.h
diff --git a/CHANGES b/CHANGES
index 988f0fb5e..db9adab03 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5684,7 +5684,7 @@ Version 1.3.28 (February 12, 2006)
%rename("%(utitle)s",%$isfunction,%$ismember) "";
- to avoid clashings with other swig macros/directives.
+ to avoid clashes with other swig macros/directives.
01/14/2006: cfisavage
[Ruby]
@@ -11787,7 +11787,7 @@ Version 1.3.20 (December 17, 2003)
11/30/2003: cheetah (William Fulton)
[Java] Fixed [ 766409 ] missing symbol SWIG_JavaThrowException during module load
- SWIGs internal functions are all static as there is no need for different SWIG
+ SWIG's internal functions are all static as there is no need for different SWIG
generated modules to share any code at runtime.
11/30/2003: beazley
@@ -21368,7 +21368,7 @@ Version 1.1 Patch 4 (January 4, 1998)
12/29/97: Fixed configure script and a few makefiles to support Python 1.5
12/29/97: Added 'embed15.i' library file. This file should be used to
- staticly link versions of Python 1.5. To make it the default,
+ statically link versions of Python 1.5. To make it the default,
simply copy 'swig_lib/python/embed15.i' to 'swig_lib/python/embed.i'
Version 1.1 Patch 3 (November 24, 1997)
diff --git a/CHANGES.current b/CHANGES.current
index 6595c248e..791665901 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -5,6 +5,12 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.0 (in progress)
============================
+2014-02-21: wsfulton
+ [PHP] Fix warning suppression using %warnfilter for PHP reserved class names.
+
+2014-02-19: olly
+ [Lua] Add keyword warnings for Lua keywords and Basic Functions.
+
2014-02-19: olly
-Wallkw now includes keywords for all languages with keyword
warnings (previously Go and R were missing).
@@ -33,6 +39,29 @@ Version 3.0.0 (in progress)
2014-02-15: wsfulton
[Java] Add support for the cdata library.
+2014-02-08: vkalinin
+ Nested class support added. This primarily allows SWIG to properly parse nested
+ classes and keep the nested class information in the parse tree. Java and C#
+ have utilised this information wrapping the C++ nested classes as Java/C#
+ nested classes. The remaining target languages ignore nested classes as in
+ previous versions. Help is needed by users of these remaining languages to
+ design how C++ nested classes can be best wrapped. Please talk to us on the
+ swig-devel mailing list if you think you can help.
+
+ Previously, there was limited nested class support. Nested classes were treated
+ as opaque pointers. However, the "nestedworkaround" feature provided a way to
+ wrap a nested class as if it was a global class. This feature no longer exists
+ and is replaced by the new "flatnested" feature. This effectively does the same
+ thing with less manual code to be written. Please see the 'Nested classes'
+ section in the documentation in SWIGPlus.html if you were previously using this
+ feature.
+
+ SWIG now parses the contents of nested classes where previously it did not. You
+ may find that you will need to make adjustments to your interface file as
+ effectively extra code is being wrapped.
+
+ *** POTENTIAL INCOMPATIBILITY ***
+
2014-02-06: gjanssens
[Guile] Patch #133. Make scm to string conversion work with non-ascii strings.
Guile 2 has a completely rewritten string implementation. SWIG made some assumptions
diff --git a/Doc/Devel/internals.html b/Doc/Devel/internals.html
index 94a82519d..c9082d3f6 100644
--- a/Doc/Devel/internals.html
+++ b/Doc/Devel/internals.html
@@ -347,7 +347,7 @@ Delete(a); /* Destroy a */
All objects are referenced counted and given a reference count of 1 when initially created. The
<tt>Delete()</tt> function only destroys an object when the reference count reaches zero. When
-an object is placed in a list or hash table, it's reference count is automatically increased. For example:
+an object is placed in a list or hash table, its reference count is automatically increased. For example:
<blockquote>
<pre>
@@ -844,7 +844,7 @@ Returns a type object corresponding to the type string produced by the Swig_cloc
<li><tt>char *Swig_clocal_deref(DataType *t, char *name)</tt><br>
This function is the inverse of the <tt>clocal()</tt> function. Given a type and a name,
it produces a string containing the code needed to cast/convert the type produced by
-<tt>Swig_clocal()</tt> back into it's original type.
+<tt>Swig_clocal()</tt> back into its original type.
<p>
<li><tt>char *Swig_clocal_assign(DataType *t, char *name)</tt><br>
diff --git a/Doc/Devel/tree.html b/Doc/Devel/tree.html
index db3c6fee4..73a49ed55 100644
--- a/Doc/Devel/tree.html
+++ b/Doc/Devel/tree.html
@@ -185,7 +185,7 @@ this function merely records that those attributes did not exist in the original
<blockquote>
This function is similar to <tt>Swig_save()</tt> except that adds additional attribute checking. There are different interpretations
of the attribute names. A name of "attr" merely requests that the function check for the presence of an attribute. If the attribute is missing, SWIG will exit with a failed assertion. An attribute name of "?attr" specifies that the attribute "attr" is optional and
-that it's old value must be saved (if any). An attribute name of "*attr" specifies that the attribute is required and that
+that its old value must be saved (if any). An attribute name of "*attr" specifies that the attribute is required and that
its value must be saved. The saving of attributes is performed in the same manner as with <tt>Swig_save()</tt>. Here is an example:
<pre>
diff --git a/Doc/Manual/Allegrocl.html b/Doc/Manual/Allegrocl.html
index 12b915ee2..173777231 100644
--- a/Doc/Manual/Allegrocl.html
+++ b/Doc/Manual/Allegrocl.html
@@ -748,7 +748,7 @@ namespace car {
<p>
Constants, as declared by the preprocessor #define macro or SWIG
- <tt>%constant</tt> directive, are included in SWIGs parse tree
+ <tt>%constant</tt> directive, are included in SWIG's parse tree
when it can be determined that they are, or could be reduced to,
a literal value. Such values are translated into defconstant
forms in the generated lisp wrapper when the -nocwrap command-line
@@ -887,7 +887,7 @@ globalvar&gt; (globalvar.nnn::glob_float)
<p>
In C, an enumeration value is an integer value, while in C++ an
enumeration value is implicitly convertible to an integer value,
- but can also be distinguished by it's enum type. For each enum
+ but can also be distinguished by its enum type. For each enum
declaration a def-foreign-type is generated, assigning the enum
a default type of :int. Users may adjust the foreign type of
enums via SWIG <tt>typemaps</tt>.
@@ -901,7 +901,7 @@ globalvar&gt; (globalvar.nnn::glob_float)
of it not being necessary to probe into foreign space to retrieve enum
values. When generating a .cxx wrapper file, a more general solution is
employed. A wrapper variable is created in the module_wrap.cxx file, and
- a ff:def-foreign-variable call is generated to retrieve it's value into lisp.
+ a ff:def-foreign-variable call is generated to retrieve its value into lisp.
</p>
<p>For example, the following header file
@@ -1131,7 +1131,7 @@ namespace BAR {
inheritance of the classes in foreign code, with the
ff:foreign-pointer class at its root. ff:foreign-pointer is a thin
wrapper for pointers that is made available by the foreign function
- interface. It's key benefit is that it may be passed as an argument
+ interface. Its key benefit is that it may be passed as an argument
to any ff:def-foreign-call that is expecting a pointer as the
parameter.
</p>
@@ -1617,7 +1617,7 @@ opoverload&gt;
directive. This directive allows you to specify a (finite)
argument list which will be inserted into the wrapper in place
of the variable length argument indicator. As an example,
- consider the function <tt>printf()</tt>. It's declaration would
+ consider the function <tt>printf()</tt>. Its declaration would
appear as follows:
</p>
@@ -1735,7 +1735,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN)
The <tt>out</tt> typemap is used to generate code to form the
return value of the wrapper from the return value of the wrapped
function. This code is placed in the &lt;convert and bind result to lresult&gt;
- section of the above code diagram. It's default mapping is as follows:
+ section of the above code diagram. Its default mapping is as follows:
</p>
<div class="code">
@@ -1758,7 +1758,7 @@ return-val wrapper-name(parm0, parm1, ..., parmN)
<p>
This typemap is not used for code generation, but purely for the
transformation of types in the parameter list of the wrapper function.
- It's primary use is to handle by-value to by-reference conversion in the
+ Its primary use is to handle by-value to by-reference conversion in the
wrappers parameter list. Its default settings are:
</p>
@@ -2093,7 +2093,7 @@ foreign environment.
<p>
The :type keyword argument provides more information on the type of
-identifier. It's value is a symbol. This allows the
+identifier. Its value is a symbol. This allows the
identifier-converter to apply different heuristics when mapping
different types of identifiers to symbols. SWIG will generate calls
to your identifier-converter using the following types.
@@ -2123,7 +2123,7 @@ scope in the specified class.
<p>
The :arity keyword argument only appears in swig:swig-defmethod forms
-generated for overloaded functions. It's value is an integer
+generated for overloaded functions. Its value is an integer
indicating the number of arguments passed to the routine indicated by
this identifier.
</p>
diff --git a/Doc/Manual/Android.html b/Doc/Manual/Android.html
index 4d1be3944..e02271169 100644
--- a/Doc/Manual/Android.html
+++ b/Doc/Manual/Android.html
@@ -435,11 +435,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
+ }
double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -447,18 +447,18 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
</pre>
</div>
@@ -482,19 +482,19 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}
</pre>
diff --git a/Doc/Manual/CSharp.html b/Doc/Manual/CSharp.html
index 764a1a6c3..6ee33ac68 100644
--- a/Doc/Manual/CSharp.html
+++ b/Doc/Manual/CSharp.html
@@ -881,7 +881,7 @@ set so should only be used when a C# exception is not created.
<p>
-Lets say we have the following simple C++ method:
+Let's say we have the following simple C++ method:
</p>
diff --git a/Doc/Manual/Extending.html b/Doc/Manual/Extending.html
index 1fc65d0e1..a8c15fe03 100644
--- a/Doc/Manual/Extending.html
+++ b/Doc/Manual/Extending.html
@@ -2761,8 +2761,8 @@ Within SWIG wrappers, there are five main sections. These are (in order)
<li>begin: This section is a placeholder for users to put code at the beginning of the C/C++ wrapper file.
<li>runtime: This section has most of the common SWIG runtime code.
<li>header: This section holds declarations and inclusions from the .i file.
-<li>wrapper: This section holds all the wrappering code.
-<li>init: This section holds the module initalisation function
+<li>wrapper: This section holds all the wrapper code.
+<li>init: This section holds the module initialisation function
(the entry point for the interpreter).
</ul>
<p>
@@ -3005,7 +3005,7 @@ virtual int functionWrapper(Node *n) {
/* write typemaps(in) */
....
- /* write constriants */
+ /* write constraints */
....
/* Emit the function call */
@@ -3350,10 +3350,10 @@ Note that if a runtime test is available, a message "(with run test)" is display
<div class="shell"><pre>
$ make check-python-test-suite
checking python test-suite
-checking testcase argcargvtest (with run test) under python
-checking testcase python_autodoc under python
-checking testcase python_append (with run test) under python
-checking testcase callback (with run test) under python
+checking python testcase argcargvtest (with run test)
+checking python testcase python_autodoc
+checking python testcase python_append (with run test)
+checking python testcase callback (with run test)
</pre></div>
<p>
diff --git a/Doc/Manual/Introduction.html b/Doc/Manual/Introduction.html
index d5dc778bd..19d59a4df 100644
--- a/Doc/Manual/Introduction.html
+++ b/Doc/Manual/Introduction.html
@@ -449,7 +449,7 @@ to work with complicated and unusual C/C++ applications.
<p>
Ironically, the freedom that SWIG provides is countered by an
-extremely conservative approach to code generation. At it's core, SWIG
+extremely conservative approach to code generation. At its core, SWIG
tries to distill even the most advanced C++ code down to a small
well-defined set of interface building techniques based on ANSI C
programming. Because of this, you will find that SWIG interfaces can
diff --git a/Doc/Manual/Java.html b/Doc/Manual/Java.html
index 08c80c83a..3144341e1 100644
--- a/Doc/Manual/Java.html
+++ b/Doc/Manual/Java.html
@@ -332,8 +332,8 @@ Assuming you have code you need to link to in a file called <tt>example.c</tt>,
<div class="code"><pre>
$ swig -java example.i
-$ gcc -c example_wrap.c -I/usr/java/include -I/usr/java/include/solaris
-$ gcc -c example.c
+$ gcc -fPIC -c example_wrap.c -I/usr/java/include -I/usr/java/include/solaris
+$ gcc -fPIC -c example.c
$ ld -G example_wrap.o example.o -o libexample.so
</pre></div>
@@ -493,8 +493,7 @@ compiler. For example:
<div class="code"><pre>
% swig -c++ -java example.i
% g++ -c -fpic example.cxx
-% g++ -c -fpic example_wrap.cxx -I/usr/java/j2sdk1.4.1/include -I/usr/java/
-j2sdk1.4.1/include/linux
+% g++ -c -fpic example_wrap.cxx -I/usr/java/j2sdk1.4.1/include -I/usr/java/j2sdk1.4.1/include/linux
% g++ -shared example.o example_wrap.o -o libexample.so
</pre></div>
@@ -6869,7 +6868,7 @@ int spam(double a, double b, double *out1, double *out2) {
*out1 = a*10.0;
*out2 = b*100.0;
return status;
-};
+}
%}
/*
diff --git a/Doc/Manual/Lisp.html b/Doc/Manual/Lisp.html
index 01ff3a3ec..09e410185 100644
--- a/Doc/Manual/Lisp.html
+++ b/Doc/Manual/Lisp.html
@@ -122,7 +122,7 @@ swig -cffi -help
As we mentioned earlier the ideal way to use SWIG is to use interface
- files. To illustrate the use of it, lets assume that we have a
+ files. To illustrate the use of it, let's assume that we have a
file named <i>test.h</i> with the following C code:
<div class="code"><pre>
diff --git a/Doc/Manual/Lua.html b/Doc/Manual/Lua.html
index 44384b1a3..379fdfc94 100644
--- a/Doc/Manual/Lua.html
+++ b/Doc/Manual/Lua.html
@@ -248,8 +248,8 @@ Most, but not all platforms support the dynamic loading of modules (Windows &amp
</p>
<div class="shell"><pre>
$ swig -lua example.i -o example_wrap.c
-$ gcc -I/usr/include/lua -c example_wrap.c -o example_wrap.o
-$ gcc -c example.c -o example.o
+$ gcc -fPIC -I/usr/include/lua -c example_wrap.c -o example_wrap.o
+$ gcc -fPIC -c example.c -o example.o
$ gcc -shared -I/usr/include/lua -L/usr/lib/lua example_wrap.o example.o -o example.so
</pre></div>
<p>
diff --git a/Doc/Manual/Modula3.html b/Doc/Manual/Modula3.html
index 065313fa2..329127a0f 100644
--- a/Doc/Manual/Modula3.html
+++ b/Doc/Manual/Modula3.html
@@ -45,7 +45,7 @@
<p>
-This chapter describes SWIG's support of
+This chapter describes SWIG's support for
<a href="http://modula3.org/">Modula-3</a>.
You should be familiar with the
<a href="SWIG.html#SWIG">basics</a>
@@ -109,7 +109,7 @@ into exceptions.
<p>
If the library API is ill designed
-writing appropriate typemaps can be still time-consuming.
+writing appropriate typemaps can still be time-consuming.
E.g. C programmers are very creative to work-around
missing data types like (real) enumerations and sets.
You should turn such work-arounds back to the Modula-3 way
@@ -120,14 +120,14 @@ otherwise you lose static safety and consistency.
Without SWIG you would probably never consider trying to call C++ libraries
from Modula-3, but with SWIG this is becomes feasible.
SWIG can generate C wrappers to C++ functions and object methods
-that may throw exceptions, and then wrap these C wrappers for Module-3.
+that may throw exceptions, and then wrap these C wrappers for Modula-3.
To make it complete you can then hide the C interface with Modula-3 classes and
exceptions.
</p>
<p>
SWIG allows you to call C and C++ libraries from Modula-3 (even with call back
-functions), but it doesn't allow you to easily integrate a Module-3 module into
+functions), but it doesn't allow you to easily integrate a Modula-3 module into
a C/C++ project.
</p>
diff --git a/Doc/Manual/Modules.html b/Doc/Manual/Modules.html
index 70b0f1181..c44341e56 100644
--- a/Doc/Manual/Modules.html
+++ b/Doc/Manual/Modules.html
@@ -130,7 +130,7 @@ public:
<p>To create the wrapper properly, module <tt>derived_module</tt> needs to know about the
<tt>base</tt> class and that its interface is covered in another module. The
-line <tt>%import "base_module.i"</tt> lets SWIG know exactly that. Oftentimes
+line <tt>%import "base_module.i"</tt> lets SWIG know exactly that. Often
the <tt>.h</tt> file is passed to <tt>%import</tt> instead of the <tt>.i</tt>,
which unfortunately doesn't work for all language modules. For example, Python requires the
name of module that the base class exists in so that the proxy classes can fully inherit the
diff --git a/Doc/Manual/Ocaml.html b/Doc/Manual/Ocaml.html
index 127be904d..2eef3ad4d 100644
--- a/Doc/Manual/Ocaml.html
+++ b/Doc/Manual/Ocaml.html
@@ -163,7 +163,7 @@ the user more freedom with respect to custom typing.
<p>
The camlp4 module (swigp4.ml -&gt; swigp4.cmo) contains a simple rewriter which
-makes C++ code blend more seamlessly with objective caml code. It's use is
+makes C++ code blend more seamlessly with objective caml code. Its use is
optional, but encouraged. The source file is included in the Lib/ocaml
directory of the SWIG source distribution. You can checkout this file with
<tt>"swig -ocaml -co swigp4.ml"</tt>. You should compile the file with
@@ -310,7 +310,7 @@ type c_obj =
</li>
<li>caml_val_ptr receives a void * and returns a c_obj.</li>
<li>caml_val_bool receives a C int and returns a c_obj representing
- it's bool value.</li>
+ its bool value.</li>
<li>caml_val_(u)?(char|short|int|long|float|double) receives an
appropriate C value and returns a c_obj representing it.</li>
<li>caml_val_string receives a char * and returns a string value.</li>
diff --git a/Doc/Manual/Octave.html b/Doc/Manual/Octave.html
index 3e12ce668..42c6526b7 100644
--- a/Doc/Manual/Octave.html
+++ b/Doc/Manual/Octave.html
@@ -329,7 +329,7 @@ octave:4&gt; swigexample.fclose(f);
</pre></div>
<p>
- Simply printing the value of a wrapped C++ type will print it's typename. E.g.,
+ Simply printing the value of a wrapped C++ type will print its typename. E.g.,
</p>
<div class="targetlang"><pre>octave:1&gt; swigexample;
diff --git a/Doc/Manual/Perl5.html b/Doc/Manual/Perl5.html
index db8c0e602..9e577b08b 100644
--- a/Doc/Manual/Perl5.html
+++ b/Doc/Manual/Perl5.html
@@ -493,8 +493,8 @@ Solaris, you often need to add an extra library <tt>-lCrun</tt> like this:
<div class="code"><pre>
$ swig -c++ -perl example.i
-$ CC -c example.cxx
-$ CC -c example_wrap.cxx -I/usr/lib/perl/5.14/i386-linux/CORE
+$ CC -Kpic -c example.cxx
+$ CC -Kpic -c example_wrap.cxx -I/usr/lib/perl/5.14/i386-linux/CORE
$ CC -shared example.o example_wrap.o -o example.so <b>-lCrun</b>
</pre></div>
diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html
index c6cc2f40f..522412fc8 100644
--- a/Doc/Manual/Python.html
+++ b/Doc/Manual/Python.html
@@ -4688,8 +4688,7 @@ int spam(double a, double b, double *out1, double *out2) {
*out1 = result1;
*out2 = result2;
return status;
-};
-
+}
</pre></div>
<p>
@@ -5551,7 +5550,15 @@ from __future__ import absolute_import
</div>
<p>at the very beginning of his proxy <tt>*.py</tt> file. In SWIG, it may be
-accomplished with <tt>%pythonbegin</tt> directive.</p>
+accomplished with <tt>%pythonbegin</tt> directive as follows:</p>
+
+<div class="code">
+<pre>
+%pythonbegin %{
+from __future__ import absolute_import
+%}
+</pre>
+</div>
<H3><a name="Python_importfrominit"></a>34.11.4 Importing from __init__.py</H3>
diff --git a/Doc/Manual/Ruby.html b/Doc/Manual/Ruby.html
index 301631a20..6ff98ca23 100644
--- a/Doc/Manual/Ruby.html
+++ b/Doc/Manual/Ruby.html
@@ -259,14 +259,22 @@ operating system would look something like this: </p>
<div class="code shell">
<pre>$ swig -ruby example.i
-$ gcc -c example.c
-$ gcc -c example_wrap.c -I/usr/local/lib/ruby/1.6/i686-linux
+$ gcc -O2 -fPIC -c example.c
+$ gcc -O2 -fPIC -c example_wrap.c -I/usr/local/lib/ruby/1.6/i686-linux
$ gcc -shared example.o example_wrap.o -o example.so
</pre>
</div>
-<p> For other platforms it may be necessary to compile with the <tt>-fPIC</tt>
-option to generate position-independent code. If in doubt, consult the
+<p>
+The -fPIC option tells GCC to generate position-independent code (PIC)
+which is required for most architectures (it's not vital on x86, but
+still a good idea as it allows code pages from the library to be shared between
+processes). Other compilers may need a different option specified instead of
+-fPIC.
+</p>
+
+<p>
+If in doubt, consult the
manual pages for your compiler and linker to determine the correct set
of options. You might also check the <a href="http://www.dabeaz.com/cgi-bin/wiki.pl">SWIG Wiki</a>
for additional information. </p>
@@ -325,8 +333,8 @@ using the C++ compiler. For example: </p>
<div class="code shell">
<pre>
$ swig -c++ -ruby example.i
-$ g++ -c example.cxx
-$ g++ -c example_wrap.cxx -I/usr/local/lib/ruby/1.6/i686-linux
+$ g++ -fPIC -c example.cxx
+$ g++ -fPIC -c example_wrap.cxx -I/usr/local/lib/ruby/1.6/i686-linux
$ g++ -shared example.o example_wrap.o -o example.so
</pre>
</div>
diff --git a/Doc/Manual/SWIGPlus.html b/Doc/Manual/SWIGPlus.html
index e0e7dbcaf..aa02b2dee 100644
--- a/Doc/Manual/SWIGPlus.html
+++ b/Doc/Manual/SWIGPlus.html
@@ -216,7 +216,7 @@ to use the C++ compiler. For example:
<div class="shell">
<pre>
$ swig -c++ -tcl example.i
-$ c++ -c example_wrap.cxx
+$ c++ -fPIC -c example_wrap.cxx
$ c++ example_wrap.o $(OBJS) -o example.so
</pre>
</div>
diff --git a/Doc/Manual/Scripting.html b/Doc/Manual/Scripting.html
index 26a8dd017..c714fa0d7 100644
--- a/Doc/Manual/Scripting.html
+++ b/Doc/Manual/Scripting.html
@@ -368,17 +368,12 @@ for a few common platforms is shown below:</p>
<div class="shell"><pre>
# Build a shared library for Solaris
-gcc -c example.c example_wrap.c -I/usr/local/include
+gcc -fpic -c example.c example_wrap.c -I/usr/local/include
ld -G example.o example_wrap.o -o example.so
# Build a shared library for Linux
gcc -fpic -c example.c example_wrap.c -I/usr/local/include
gcc -shared example.o example_wrap.o -o example.so
-
-# Build a shared library for Irix
-gcc -c example.c example_wrap.c -I/usr/local/include
-ld -shared example.o example_wrap.o -o example.so
-
</pre></div>
<p>
diff --git a/Doc/Manual/Tcl.html b/Doc/Manual/Tcl.html
index e6b3b4a43..9b9cd7218 100644
--- a/Doc/Manual/Tcl.html
+++ b/Doc/Manual/Tcl.html
@@ -139,8 +139,8 @@ using commands like this (shown for Linux):
<div class="code"><pre>
$ swig -tcl example.i
-$ gcc -c example.c
-$ gcc -c example_wrap.c -I/usr/local/include
+$ gcc -fPIC -c example.c
+$ gcc -fPIC -c example_wrap.c -I/usr/local/include
$ gcc -shared example.o example_wrap.o -o example.so
</pre></div>
@@ -374,8 +374,8 @@ compiler. For example:
<div class="code"><pre>
% swig -c++ -tcl example.i
-% g++ -c example.cxx
-% g++ -c example_wrap.cxx -I/usr/local/include
+% g++ -fPIC -c example.cxx
+% g++ -fPIC -c example_wrap.cxx -I/usr/local/include
% g++ -shared example.o example_wrap.o -o example.so
</pre></div>
@@ -387,8 +387,8 @@ Solaris, you often need to add an extra library <tt>-lCrun</tt> like this:
<div class="code"><pre>
% swig -c++ -tcl example.i
-% CC -c example.cxx
-% CC -c example_wrap.cxx -I/usr/local/include
+% CC -KPIC -c example.cxx
+% CC -KPIC -c example_wrap.cxx -I/usr/local/include
% CC -G example.o example_wrap.o -L/opt/SUNWspro/lib -o example.so -lCrun
</pre></div>
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index 5c7884a8f..218d8eca5 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -1098,7 +1098,7 @@ CHICKEN_GENERATED_SCHEME = $(INTERFACE:.i=.scm)
CHICKEN_COMPILED_SCHEME = $(INTERFACE:.i=_chicken.c)
CHICKEN_COMPILED_OBJECT = $(CHICKEN_COMPILED_SCHEME:.c=.@OBJEXT@)
-# flags for the main chicken sources (only used when compiling staticly)
+# flags for the main chicken sources (only used when compiling statically)
CHICKEN_COMPILED_MAIN = $(CHICKEN_MAIN:.scm=_chicken.c)
CHICKEN_COMPILED_MAIN_OBJECT = $(CHICKEN_COMPILED_MAIN:.c=.@OBJEXT@)
diff --git a/Examples/README b/Examples/README
index 4dda3222d..eff0f2c98 100644
--- a/Examples/README
+++ b/Examples/README
@@ -1,24 +1,18 @@
SWIG Examples
-The "perl5", "python", "tcl", "guile", "java", "mzscheme", "ruby", and
-"chicken" directories contain a number of simple examples that are
-primarily used for testing.
+The subdirectories of "Examples" named after SWIG's language backends
+contain a number of simple examples that are primarily used for testing.
The file 'index.html' is the top of a hyperlinked document that
contains information about all of the examples along with various
notes related to each example.
-The Examples directory is currently quite incomplete because it
-is being reorganized. A more complete set of examples can be found
-in the SWIG1.1p5 distribution (most of which should still work with
-SWIG1.3).
-
Note: All of the examples rely upon the Makefile in this directory.
You may need to edit it to reflect the configuration of your machine
in case the configure script guesses incorrect settings.
-*** Special note concering C++ ***
+*** Special note concerning C++ ***
The configure script is currently unable to handle all of the possible
options for producing dynamically loadable C++ extensions. Here are
diff --git a/Examples/android/class/jni/example.cpp b/Examples/android/class/jni/example.cpp
index d59cc7c32..7686159fa 100644
--- a/Examples/android/class/jni/example.cpp
+++ b/Examples/android/class/jni/example.cpp
@@ -11,18 +11,18 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}
diff --git a/Examples/android/class/jni/example.h b/Examples/android/class/jni/example.h
index 64b7684fa..0dff185b2 100644
--- a/Examples/android/class/jni/example.h
+++ b/Examples/android/class/jni/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,16 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
diff --git a/Examples/chicken/class/example.h b/Examples/chicken/class/example.h
index 210ba989f..5bad31693 100644
--- a/Examples/chicken/class/example.h
+++ b/Examples/chicken/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
enum SomeEnum {
@@ -26,21 +26,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/chicken/class/example.i b/Examples/chicken/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/chicken/class/example.i
+++ b/Examples/chicken/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/csharp/arrays/example-cs.csproj b/Examples/csharp/arrays/example-cs.csproj
new file mode 100644
index 000000000..422c76be3
--- /dev/null
+++ b/Examples/csharp/arrays/example-cs.csproj
@@ -0,0 +1,90 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/arrays/example-vc.vcproj b/Examples/csharp/arrays/example-vc.vcproj
new file mode 100644
index 000000000..d3ee58ec4
--- /dev/null
+++ b/Examples/csharp/arrays/example-vc.vcproj
@@ -0,0 +1,415 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="example"
+ ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="example.c"
+ >
+ </File>
+ <File
+ RelativePath="example_wrap.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="example.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Examples/csharp/arrays/example.sln b/Examples/csharp/arrays/example.sln
new file mode 100644
index 000000000..234bd64d3
--- /dev/null
+++ b/Examples/csharp/arrays/example.sln
@@ -0,0 +1,38 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Examples/csharp/callback/example-cs.csproj b/Examples/csharp/callback/example-cs.csproj
index ce5ccfd9a..14d43dcb2 100644
--- a/Examples/csharp/callback/example-cs.csproj
+++ b/Examples/csharp/callback/example-cs.csproj
@@ -1,99 +1,88 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "Callback.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Caller.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Callback.cs" />
+ <Compile Include="Caller.cs" />
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/callback/example-vc.vcproj b/Examples/csharp/callback/example-vc.vcproj
index 5788bc9c7..5958945e9 100644
--- a/Examples/csharp/callback/example-vc.vcproj
+++ b/Examples/csharp/callback/example-vc.vcproj
@@ -1,110 +1,345 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="example"
ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
- Keyword="Win32Proj">
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
- MinimalRebuild="TRUE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCXMLDataGeneratorTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCWebServiceProxyGeneratorTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCResourceCompilerTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCPreLinkEventTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCPreBuildEventTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCCustomBuildTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
</Configurations>
<References>
@@ -113,43 +348,69 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
<File
- RelativePath="example.cxx">
+ RelativePath="example.cxx"
+ >
</File>
<File
- RelativePath="example_wrap.cxx">
+ RelativePath="example_wrap.cxx"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
<File
- RelativePath="example.h">
+ RelativePath="example.h"
+ >
+ </File>
+ <File
+ RelativePath="example_wrap.h"
+ >
</File>
</Filter>
<File
- RelativePath=".\example.i">
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
<FileConfiguration
- Name="Debug|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|x64"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
</File>
</Files>
diff --git a/Examples/csharp/callback/example.sln b/Examples/csharp/callback/example.sln
index 88995ffd3..234bd64d3 100644
--- a/Examples/csharp/callback/example.sln
+++ b/Examples/csharp/callback/example.sln
@@ -1,30 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
EndProject
Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.ActiveCfg = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.Build.0 = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.ActiveCfg = Release|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.Build.0 = Release|.NET
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.ActiveCfg = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.Build.0 = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.ActiveCfg = Release|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.Build.0 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/Examples/csharp/class/example-cs.csproj b/Examples/csharp/class/example-cs.csproj
index 8b105d7fc..4f6d66ae1 100644
--- a/Examples/csharp/class/example-cs.csproj
+++ b/Examples/csharp/class/example-cs.csproj
@@ -1,104 +1,89 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "Circle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Shape.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Square.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Circle.cs" />
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Shape.cs" />
+ <Compile Include="Square.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/class/example-vc.vcproj b/Examples/csharp/class/example-vc.vcproj
index 5788bc9c7..ef870959e 100644
--- a/Examples/csharp/class/example-vc.vcproj
+++ b/Examples/csharp/class/example-vc.vcproj
@@ -1,110 +1,345 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="example"
ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
- Keyword="Win32Proj">
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
- MinimalRebuild="TRUE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCPreBuildEventTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
</Configurations>
<References>
@@ -113,43 +348,65 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
<File
- RelativePath="example.cxx">
+ RelativePath="example.cxx"
+ >
</File>
<File
- RelativePath="example_wrap.cxx">
+ RelativePath="example_wrap.cxx"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
<File
- RelativePath="example.h">
+ RelativePath="example.h"
+ >
</File>
</Filter>
<File
- RelativePath=".\example.i">
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
<FileConfiguration
- Name="Debug|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|x64"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
</File>
</Files>
diff --git a/Examples/csharp/class/example.h b/Examples/csharp/class/example.h
index 46d901361..0dff185b2 100644
--- a/Examples/csharp/class/example.h
+++ b/Examples/csharp/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/csharp/class/example.i b/Examples/csharp/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/csharp/class/example.i
+++ b/Examples/csharp/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/csharp/class/example.sln b/Examples/csharp/class/example.sln
index 88995ffd3..234bd64d3 100644
--- a/Examples/csharp/class/example.sln
+++ b/Examples/csharp/class/example.sln
@@ -1,30 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
EndProject
Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.ActiveCfg = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.Build.0 = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.ActiveCfg = Release|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.Build.0 = Release|.NET
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.ActiveCfg = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.Build.0 = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.ActiveCfg = Release|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.Build.0 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/Examples/csharp/enum/example-cs.csproj b/Examples/csharp/enum/example-cs.csproj
index 44face8ed..5c8bd3cc4 100644
--- a/Examples/csharp/enum/example-cs.csproj
+++ b/Examples/csharp/enum/example-cs.csproj
@@ -1,99 +1,88 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "color.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Foo.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="color.cs" />
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Foo.cs" />
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/enum/example-vc.vcproj b/Examples/csharp/enum/example-vc.vcproj
index 5788bc9c7..ef870959e 100644
--- a/Examples/csharp/enum/example-vc.vcproj
+++ b/Examples/csharp/enum/example-vc.vcproj
@@ -1,110 +1,345 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="example"
ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
- Keyword="Win32Proj">
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
- MinimalRebuild="TRUE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCPreBuildEventTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
</Configurations>
<References>
@@ -113,43 +348,65 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
<File
- RelativePath="example.cxx">
+ RelativePath="example.cxx"
+ >
</File>
<File
- RelativePath="example_wrap.cxx">
+ RelativePath="example_wrap.cxx"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
<File
- RelativePath="example.h">
+ RelativePath="example.h"
+ >
</File>
</Filter>
<File
- RelativePath=".\example.i">
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
<FileConfiguration
- Name="Debug|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|x64"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
</File>
</Files>
diff --git a/Examples/csharp/enum/example.sln b/Examples/csharp/enum/example.sln
index 88995ffd3..234bd64d3 100644
--- a/Examples/csharp/enum/example.sln
+++ b/Examples/csharp/enum/example.sln
@@ -1,30 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
EndProject
Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.ActiveCfg = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.Build.0 = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.ActiveCfg = Release|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.Build.0 = Release|.NET
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.ActiveCfg = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.Build.0 = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.ActiveCfg = Release|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.Build.0 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/Examples/csharp/extend/example-cs.csproj b/Examples/csharp/extend/example-cs.csproj
index 95923991b..68d202c58 100644
--- a/Examples/csharp/extend/example-cs.csproj
+++ b/Examples/csharp/extend/example-cs.csproj
@@ -1,104 +1,89 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "Employee.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "EmployeeList.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Manager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Employee.cs" />
+ <Compile Include="EmployeeList.cs" />
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Manager.cs" />
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/extend/example-vc.vcproj b/Examples/csharp/extend/example-vc.vcproj
index 5788bc9c7..5958945e9 100644
--- a/Examples/csharp/extend/example-vc.vcproj
+++ b/Examples/csharp/extend/example-vc.vcproj
@@ -1,110 +1,345 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="example"
ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
- Keyword="Win32Proj">
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
- MinimalRebuild="TRUE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCXMLDataGeneratorTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCWebServiceProxyGeneratorTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCResourceCompilerTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCPreLinkEventTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCPreBuildEventTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCCustomBuildTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
</Configurations>
<References>
@@ -113,43 +348,69 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
<File
- RelativePath="example.cxx">
+ RelativePath="example.cxx"
+ >
</File>
<File
- RelativePath="example_wrap.cxx">
+ RelativePath="example_wrap.cxx"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
<File
- RelativePath="example.h">
+ RelativePath="example.h"
+ >
+ </File>
+ <File
+ RelativePath="example_wrap.h"
+ >
</File>
</Filter>
<File
- RelativePath=".\example.i">
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
<FileConfiguration
- Name="Debug|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|x64"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
</File>
</Files>
diff --git a/Examples/csharp/extend/example.sln b/Examples/csharp/extend/example.sln
index 88995ffd3..234bd64d3 100644
--- a/Examples/csharp/extend/example.sln
+++ b/Examples/csharp/extend/example.sln
@@ -1,30 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
EndProject
Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.ActiveCfg = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.Build.0 = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.ActiveCfg = Release|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.Build.0 = Release|.NET
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.ActiveCfg = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.Build.0 = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.ActiveCfg = Release|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.Build.0 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/Examples/csharp/funcptr/example-cs.csproj b/Examples/csharp/funcptr/example-cs.csproj
index 5a107c528..d8c455927 100644
--- a/Examples/csharp/funcptr/example-cs.csproj
+++ b/Examples/csharp/funcptr/example-cs.csproj
@@ -1,94 +1,87 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "SWIGTYPE_p_f_int_int__int.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SWIGTYPE_p_f_int_int__int.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/funcptr/example-vc.vcproj b/Examples/csharp/funcptr/example-vc.vcproj
index 7ba8cbde1..d3ee58ec4 100644
--- a/Examples/csharp/funcptr/example-vc.vcproj
+++ b/Examples/csharp/funcptr/example-vc.vcproj
@@ -1,110 +1,345 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="example"
ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
- Keyword="Win32Proj">
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
- MinimalRebuild="TRUE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCPreBuildEventTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
</Configurations>
<References>
@@ -113,45 +348,65 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
<File
- RelativePath=".\example.c">
+ RelativePath="example.c"
+ >
</File>
<File
- RelativePath=".\example_wrap.c">
+ RelativePath="example_wrap.c"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
<File
- RelativePath=".\example.h">
+ RelativePath="example.h"
+ >
</File>
</Filter>
<File
- RelativePath=".\example.i">
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
<FileConfiguration
- Name="Debug|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;
-@echo off
-"
- Outputs="$(InputName)_wrap.c"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|x64"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;
-@echo off
-"
- Outputs="$(InputName)_wrap.c"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
</FileConfiguration>
</File>
</Files>
diff --git a/Examples/csharp/funcptr/example.sln b/Examples/csharp/funcptr/example.sln
index 88995ffd3..234bd64d3 100644
--- a/Examples/csharp/funcptr/example.sln
+++ b/Examples/csharp/funcptr/example.sln
@@ -1,30 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
EndProject
Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.ActiveCfg = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.Build.0 = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.ActiveCfg = Release|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.Build.0 = Release|.NET
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.ActiveCfg = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.Build.0 = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.ActiveCfg = Release|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.Build.0 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/Examples/csharp/reference/example-cs.csproj b/Examples/csharp/reference/example-cs.csproj
index a3efbe036..c8ad31839 100644
--- a/Examples/csharp/reference/example-cs.csproj
+++ b/Examples/csharp/reference/example-cs.csproj
@@ -1,99 +1,88 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Vector.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "VectorArray.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Vector.cs" />
+ <Compile Include="VectorArray.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/reference/example-vc.vcproj b/Examples/csharp/reference/example-vc.vcproj
index 5788bc9c7..ef870959e 100644
--- a/Examples/csharp/reference/example-vc.vcproj
+++ b/Examples/csharp/reference/example-vc.vcproj
@@ -1,110 +1,345 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="example"
ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
- Keyword="Win32Proj">
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
- MinimalRebuild="TRUE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCPreBuildEventTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
</Configurations>
<References>
@@ -113,43 +348,65 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
<File
- RelativePath="example.cxx">
+ RelativePath="example.cxx"
+ >
</File>
<File
- RelativePath="example_wrap.cxx">
+ RelativePath="example_wrap.cxx"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
<File
- RelativePath="example.h">
+ RelativePath="example.h"
+ >
</File>
</Filter>
<File
- RelativePath=".\example.i">
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
<FileConfiguration
- Name="Debug|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|x64"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
</File>
</Files>
diff --git a/Examples/csharp/reference/example.sln b/Examples/csharp/reference/example.sln
index 88995ffd3..234bd64d3 100644
--- a/Examples/csharp/reference/example.sln
+++ b/Examples/csharp/reference/example.sln
@@ -1,30 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
EndProject
Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.ActiveCfg = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.Build.0 = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.ActiveCfg = Release|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.Build.0 = Release|.NET
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.ActiveCfg = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.Build.0 = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.ActiveCfg = Release|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.Build.0 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/Examples/csharp/simple/example-cs.csproj b/Examples/csharp/simple/example-cs.csproj
index 3d91f9a47..6138dd0ec 100644
--- a/Examples/csharp/simple/example-cs.csproj
+++ b/Examples/csharp/simple/example-cs.csproj
@@ -1,89 +1,86 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/simple/example-vc.vcproj b/Examples/csharp/simple/example-vc.vcproj
index ec289c6eb..74b504671 100644
--- a/Examples/csharp/simple/example-vc.vcproj
+++ b/Examples/csharp/simple/example-vc.vcproj
@@ -10,14 +10,17 @@
<Platform
Name="Win32"
/>
+ <Platform
+ Name="x64"
+ />
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
@@ -60,12 +63,12 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
+ ImportLibrary="$(OutDir)\example.lib"
TargetMachine="1"
/>
<Tool
@@ -91,12 +94,96 @@
/>
<Tool
Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
@@ -136,13 +223,14 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
+ ImportLibrary="$(OutDir)\example.lib"
TargetMachine="1"
/>
<Tool
@@ -168,6 +256,89 @@
/>
<Tool
Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
@@ -180,11 +351,11 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath=".\example.c"
+ RelativePath="example.c"
>
</File>
<File
- RelativePath=".\example_wrap.c"
+ RelativePath="example_wrap.c"
>
</File>
</Filter>
@@ -207,6 +378,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|Win32"
>
<Tool
@@ -215,6 +395,15 @@
Outputs="$(InputName)_wrap.c"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
</File>
</Files>
<Globals>
diff --git a/Examples/csharp/simple/example.sln b/Examples/csharp/simple/example.sln
index 3ebbba5c6..234bd64d3 100644
--- a/Examples/csharp/simple/example.sln
+++ b/Examples/csharp/simple/example.sln
@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
@@ -10,15 +10,27 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|Any CPU
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
{C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
{C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
{C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
{C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Examples/csharp/template/example-cs.csproj b/Examples/csharp/template/example-cs.csproj
index bf17c141f..782aeacae 100644
--- a/Examples/csharp/template/example-cs.csproj
+++ b/Examples/csharp/template/example-cs.csproj
@@ -1,109 +1,90 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "SWIGTYPE_p_double.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "SWIGTYPE_p_int.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "vecdouble.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "vecint.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SWIGTYPE_p_double.cs" />
+ <Compile Include="SWIGTYPE_p_int.cs" />
+ <Compile Include="vecdouble.cs" />
+ <Compile Include="vecint.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/template/example-vc.vcproj b/Examples/csharp/template/example-vc.vcproj
index f7bbbcb62..f8a900096 100644
--- a/Examples/csharp/template/example-vc.vcproj
+++ b/Examples/csharp/template/example-vc.vcproj
@@ -1,110 +1,345 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="example"
ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
- Keyword="Win32Proj">
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
- MinimalRebuild="TRUE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCPreBuildEventTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
</Configurations>
<References>
@@ -113,42 +348,61 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
<File
- RelativePath="example_wrap.cxx">
+ RelativePath="example_wrap.cxx"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
<File
- RelativePath="example.h">
+ RelativePath="example.h"
+ >
</File>
</Filter>
<File
- RelativePath=".\example.i">
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
+ </FileConfiguration>
<FileConfiguration
- Name="Debug|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off
-"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|x64"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;
-@echo off
-"
- Outputs="$(InputName)_wrap.cxx"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -c++ -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.cxx"
+ />
</FileConfiguration>
</File>
</Files>
diff --git a/Examples/csharp/template/example.sln b/Examples/csharp/template/example.sln
index 88995ffd3..234bd64d3 100644
--- a/Examples/csharp/template/example.sln
+++ b/Examples/csharp/template/example.sln
@@ -1,30 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
EndProject
Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.ActiveCfg = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.Build.0 = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.ActiveCfg = Release|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.Build.0 = Release|.NET
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.ActiveCfg = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.Build.0 = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.ActiveCfg = Release|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.Build.0 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/Examples/csharp/variables/example-cs.csproj b/Examples/csharp/variables/example-cs.csproj
index a73c879fb..d2ce17a6a 100644
--- a/Examples/csharp/variables/example-cs.csproj
+++ b/Examples/csharp/variables/example-cs.csproj
@@ -1,99 +1,88 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "runme"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Exe"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "runme"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = ".\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References/>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "example.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "examplePINVOKE.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "runme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "SWIGTYPE_p_int.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "SWIGTYPE_p_Point.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>runme</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>runme</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="example.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="examplePINVOKE.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="runme.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SWIGTYPE_p_int.cs" />
+ <Compile Include="SWIGTYPE_p_Point.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy runme.exe "$(SolutionDir)runme.exe"
+echo Run the example from the root directory $(SolutionDir) and ensure example.dll is also in this directory</PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/Examples/csharp/variables/example-vc.vcproj b/Examples/csharp/variables/example-vc.vcproj
index acd55a379..d3ee58ec4 100644
--- a/Examples/csharp/variables/example-vc.vcproj
+++ b/Examples/csharp/variables/example-vc.vcproj
@@ -1,110 +1,345 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="example"
ProjectGUID="{C2302635-D489-4678-96B4-70F5309DCBE6}"
- Keyword="Win32Proj">
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
- MinimalRebuild="TRUE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
- ProgramDatabaseFile="$(OutDir)/example.pdb"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCXMLDataGeneratorTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCWebServiceProxyGeneratorTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCResourceCompilerTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCPreLinkEventTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
<Tool
Name="VCLinkerTool"
- OutputFile="example.dll"
+ OutputFile="$(OutDir)\example.dll"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- ImportLibrary="$(OutDir)/example.lib"
- TargetMachine="1"/>
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPostBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
- Name="VCWebDeploymentTool"/>
+ Name="VCPreBuildEventTool"
+ />
<Tool
- Name="VCManagedWrapperGeneratorTool"/>
+ Name="VCCustomBuildTool"
+ />
<Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EXAMPLEVC_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\example.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\example.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\example.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy unmanaged dll to root directory..."
+ CommandLine="echo on&#x0D;&#x0A;copy &quot;$(OutDir)\example.dll&quot; &quot;$(SolutionDir)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ />
</Configuration>
</Configurations>
<References>
@@ -113,42 +348,65 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
<File
- RelativePath=".\example.c">
+ RelativePath="example.c"
+ >
</File>
<File
- RelativePath=".\example_wrap.c">
+ RelativePath="example_wrap.c"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="example.h"
+ >
+ </File>
</Filter>
<File
- RelativePath=".\example.i">
+ RelativePath=".\example.i"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
+ </FileConfiguration>
<FileConfiguration
- Name="Debug|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;
-@echo off
-"
- Outputs="$(InputName)_wrap.c"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|x64"
+ >
<Tool
Name="VCCustomBuildTool"
- CommandLine="echo Invoking SWIG...
-echo on
-..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;
-@echo off
-"
- Outputs="$(InputName)_wrap.c"/>
+ CommandLine="echo Invoking SWIG...&#x0D;&#x0A;echo on&#x0D;&#x0A;..\..\..\swig.exe -csharp &quot;$(InputPath)&quot;&#x0D;&#x0A;@echo off&#x0D;&#x0A;"
+ Outputs="$(InputName)_wrap.c"
+ />
</FileConfiguration>
</File>
</Files>
diff --git a/Examples/csharp/variables/example.sln b/Examples/csharp/variables/example.sln
index 88995ffd3..234bd64d3 100644
--- a/Examples/csharp/variables/example.sln
+++ b/Examples/csharp/variables/example.sln
@@ -1,30 +1,38 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-cs", "example-cs.csproj", "{C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}"
ProjectSection(ProjectDependencies) = postProject
{C2302635-D489-4678-96B4-70F5309DCBE6} = {C2302635-D489-4678-96B4-70F5309DCBE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-vc", "example-vc.vcproj", "{C2302635-D489-4678-96B4-70F5309DCBE6}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
EndProject
Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.ActiveCfg = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug.Build.0 = Debug|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.ActiveCfg = Release|.NET
- {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release.Build.0 = Release|.NET
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.ActiveCfg = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug.Build.0 = Debug|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.ActiveCfg = Release|Win32
- {C2302635-D489-4678-96B4-70F5309DCBE6}.Release.Build.0 = Release|Win32
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.ActiveCfg = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|Win32.Build.0 = Debug|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.ActiveCfg = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Debug|x64.Build.0 = Debug|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.ActiveCfg = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|Win32.Build.0 = Release|x86
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.ActiveCfg = Release|x64
+ {C17D27DF-4C57-4625-AEE0-A40C4F48FF1A}.Release|x64.Build.0 = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|Win32.Build.0 = Debug|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.ActiveCfg = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Debug|x64.Build.0 = Debug|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.ActiveCfg = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|Win32.Build.0 = Release|Win32
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.ActiveCfg = Release|x64
+ {C2302635-D489-4678-96B4-70F5309DCBE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/Examples/d/class/example.h b/Examples/d/class/example.h
index 0d4527e92..0dff185b2 100644
--- a/Examples/d/class/example.h
+++ b/Examples/d/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
+ }
double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,16 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
diff --git a/Examples/d/class/example.i b/Examples/d/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/d/class/example.i
+++ b/Examples/d/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/go/class/example.h b/Examples/go/class/example.h
index 46d901361..0dff185b2 100644
--- a/Examples/go/class/example.h
+++ b/Examples/go/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/go/class/example.i b/Examples/go/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/go/class/example.i
+++ b/Examples/go/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/go/template/index.html b/Examples/go/template/index.html
index a14e3b29a..cf2b1337b 100644
--- a/Examples/go/template/index.html
+++ b/Examples/go/template/index.html
@@ -17,7 +17,7 @@ SWIG.
<h2>The C++ Code</h2>
-Lets take a templated function and a templated class as follows:
+Let's take a templated function and a templated class as follows:
<blockquote>
<pre>
diff --git a/Examples/guile/class/example.h b/Examples/guile/class/example.h
index 0d4527e92..0dff185b2 100644
--- a/Examples/guile/class/example.h
+++ b/Examples/guile/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
+ }
double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,16 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
diff --git a/Examples/guile/matrix/runme.scm b/Examples/guile/matrix/runme.scm
index f11061e56..f11061e56 100644..100755
--- a/Examples/guile/matrix/runme.scm
+++ b/Examples/guile/matrix/runme.scm
diff --git a/Examples/java/class/example.cxx b/Examples/java/class/example.cxx
index 1e8e203dd..046304519 100644
--- a/Examples/java/class/example.cxx
+++ b/Examples/java/class/example.cxx
@@ -1,4 +1,4 @@
-/* File : example.c */
+/* File : example.cxx */
#include "example.h"
#define M_PI 3.14159265358979323846
@@ -11,18 +11,18 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}
diff --git a/Examples/java/class/example.h b/Examples/java/class/example.h
index 46d901361..0dff185b2 100644
--- a/Examples/java/class/example.h
+++ b/Examples/java/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/java/class/example.i b/Examples/java/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/java/class/example.i
+++ b/Examples/java/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/java/class/index.html b/Examples/java/class/index.html
index cf9130c62..b0a5e221d 100644
--- a/Examples/java/class/index.html
+++ b/Examples/java/class/index.html
@@ -32,8 +32,8 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
virtual double area() = 0;
virtual double perimeter() = 0;
@@ -44,7 +44,7 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
+ Circle(double r) : radius(r) { }
virtual double area();
virtual double perimeter();
};
@@ -53,7 +53,7 @@ class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
+ Square(double w) : width(w) { }
virtual double area();
virtual double perimeter();
};
@@ -146,50 +146,15 @@ Shape.setNshapes(13); // Set a static data member
<ul>
<li>This high-level interface using proxy classes is not the only way to handle C++ code.
-A low level interface using c functions to access member variables and member functions is the alternative SWIG
-approach. This entails passing around the c pointer or c++ 'this' pointer and as such it is not difficult to crash the JVM.
+A low level interface using C functions to access member variables and member functions is the alternative SWIG
+approach. This entails passing around the C pointer or C++ 'this' pointer and as such it is not difficult to crash the JVM.
The abstraction of the underlying pointer by the java proxy classes far better fits the java programming paradigm.
<p>
-<li>SWIG *does* know how to properly perform upcasting of objects in an inheritance
+<li>SWIG <b>does</b> know how to properly perform upcasting of objects in an inheritance
hierarchy (including multiple inheritance). However Java classes can only derive from one base class so multiple inheritance
is not implemented. Java classes can implement more than one interface so there is scope for improvement in the future.
-<p>
-<li>A wide variety of C++ features are not currently supported by SWIG. Here is the
-short and incomplete list:
-
-<p>
-<ul>
-<li>Overloaded methods and functions. SWIG wrappers don't know how to resolve name
-conflicts so you must give an alternative name to any overloaded method name using the
-%name directive like this:
-
-<blockquote>
-<pre>
-void foo(int a);
-%name(foo2) void foo(double a, double b);
-</pre>
-</blockquote>
-
-<p>
-<li>Overloaded operators. Not supported at all. The only workaround for this is
-to write a helper function. For example:
-
-<blockquote>
-<pre>
-%inline %{
- Vector *vector_add(Vector *a, Vector *b) {
- ... whatever ...
- }
-%}
-</pre>
-</blockquote>
-
-<p>
-<li>Namespaces. Not supported at all. Won't be supported until SWIG2.0 (if at all).
-
-</ul>
</ul>
<hr>
diff --git a/Examples/java/template/index.html b/Examples/java/template/index.html
index f4408e568..31dba6d8e 100644
--- a/Examples/java/template/index.html
+++ b/Examples/java/template/index.html
@@ -16,7 +16,7 @@ This example illustrates how C++ templates can be used from Java using SWIG.
<h2>The C++ Code</h2>
-Lets take a templated function and a templated class as follows:
+Let's take a templated function and a templated class as follows:
<blockquote>
<pre>
diff --git a/Examples/lua/class/example.h b/Examples/lua/class/example.h
index 46d901361..0dff185b2 100644
--- a/Examples/lua/class/example.h
+++ b/Examples/lua/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/lua/class/example.i b/Examples/lua/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/lua/class/example.i
+++ b/Examples/lua/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/lua/embed2/embed2.c b/Examples/lua/embed2/embed2.c
index 8d28ee6ea..3145d3b10 100644
--- a/Examples/lua/embed2/embed2.c
+++ b/Examples/lua/embed2/embed2.c
@@ -31,6 +31,9 @@ We will be using the luaL_dostring()/lua_dostring() function to call into lua
#include <stdarg.h>
#include <string.h>
+#if LUA_VERSION_NUM > 501
+#define lua_open luaL_newstate
+#endif
/* the SWIG wrappered library */
extern int luaopen_example(lua_State*L);
@@ -46,8 +49,7 @@ int call_add(lua_State *L,int a,int b,int* res) {
push a, push b, call 'add' check & return res
*/
top=lua_gettop(L); /* for later */
- lua_pushstring(L, "add"); /* function name */
- lua_gettable(L, LUA_GLOBALSINDEX); /* function to be called */
+ lua_getglobal(L, "add"); /* function to be called */
if (!lua_isfunction(L,-1)) {
printf("[C] error: cannot find function 'add'\n");
lua_settop(L,top); // reset
diff --git a/Examples/lua/embed3/embed3.cpp b/Examples/lua/embed3/embed3.cpp
index e5e0e0a7d..cdf56268d 100644
--- a/Examples/lua/embed3/embed3.cpp
+++ b/Examples/lua/embed3/embed3.cpp
@@ -26,11 +26,15 @@ extern "C" {
#include <lauxlib.h>
#include <lualib.h>
}
-
-/* The SWIG external runtime is generated by using.
-swig -lua -externalruntime swigluarun.h
-It contains useful function used by SWIG in its wrappering
-SWIG_TypeQuery() SWIG_NewPointerObj()
+
+#if LUA_VERSION_NUM > 501
+#define lua_open luaL_newstate
+#endif
+
+/* The SWIG external runtime is generated by using.
+swig -lua -externalruntime swigluarun.h
+It contains useful function used by SWIG in its wrappering
+SWIG_TypeQuery() SWIG_NewPointerObj()
*/
#include "swigluarun.h" // the SWIG external runtime
@@ -65,8 +69,7 @@ int call_onEvent(lua_State *L, Event e) {
push a, push b, call 'add' check & return res
*/
top = lua_gettop(L); /* for later */
- lua_pushstring(L, "onEvent"); /* function name */
- lua_gettable(L, LUA_GLOBALSINDEX); /* function to be called */
+ lua_getglobal(L, "onEvent"); /* function to be called */
if (!lua_isfunction(L, -1)) {
printf("[C++] error: cannot find function 'OnEvent'\n");
lua_settop(L, top); // reset
diff --git a/Examples/lua/import.lua b/Examples/lua/import.lua
index b2a40b017..4a0f0d3da 100644
--- a/Examples/lua/import.lua
+++ b/Examples/lua/import.lua
@@ -1,7 +1,7 @@
-- import
-- the lua 5.0 loading mechanism is rather poor & relies upon the loadlib() fn
-- the lua 5.1 loading mechanism is simplicity itself
--- for now we need a bridge which will use the correct verion
+-- for now we need a bridge which will use the correct version
function import_5_0(module)
-- imports the file into the program
@@ -10,7 +10,7 @@ function import_5_0(module)
-- and look for the fn 'Example_Init()' (note the capitalisation)
if rawget(_G,module)~=nil then return end -- module appears to be loaded
- -- capitialising the first letter
+ -- capitalising the first letter
local c=string.upper(string.sub(module,1,1))
local fnname=c..string.sub(module,2).."_Init"
@@ -26,7 +26,7 @@ function import_5_0(module)
end
assert(lib,"error loading module:"..module)
- lib() -- execute the function: initalising the lib
+ lib() -- execute the function: initialising the lib
local m=rawget(_G,module) -- gets the module object
assert(m~=nil,"no module table found")
end
@@ -39,4 +39,4 @@ if string.sub(_VERSION,1,7)=='Lua 5.0' then
import=import_5_0
else
import=import_5_1
-end \ No newline at end of file
+end
diff --git a/Examples/modula3/class/example.h b/Examples/modula3/class/example.h
index 9c1f47995..0dff185b2 100644
--- a/Examples/modula3/class/example.h
+++ b/Examples/modula3/class/example.h
@@ -1,44 +1,34 @@
/* File : example.h */
-class Shape
-{
+class Shape {
public:
- Shape ()
- {
+ Shape() {
nshapes++;
}
- virtual ~ Shape ()
- {
+ virtual ~Shape() {
nshapes--;
- };
- double x, y;
- void move (double dx, double dy);
- virtual double area (void) const = 0;
- virtual double perimeter (void) const = 0;
-protected:
- static int nshapes;
+ }
+ double x, y;
+ void move(double dx, double dy);
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
+ static int nshapes;
};
-class Circle:public Shape
-{
+class Circle : public Shape {
private:
double radius;
public:
- Circle (double r):radius (r)
- {
- };
- virtual double area (void) const;
- virtual double perimeter (void) const;
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
-class Square:public Shape
-{
+class Square : public Shape {
private:
double width;
public:
- Square (double w):width (w)
- {
- };
- virtual double area (void) const;
- virtual double perimeter (void) const;
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
diff --git a/Examples/octave/class/example.h b/Examples/octave/class/example.h
index 0d4527e92..0dff185b2 100644
--- a/Examples/octave/class/example.h
+++ b/Examples/octave/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
+ }
double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,16 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
diff --git a/Examples/perl5/class/example.cxx b/Examples/perl5/class/example.cxx
index 1e8e203dd..046304519 100644
--- a/Examples/perl5/class/example.cxx
+++ b/Examples/perl5/class/example.cxx
@@ -1,4 +1,4 @@
-/* File : example.c */
+/* File : example.cxx */
#include "example.h"
#define M_PI 3.14159265358979323846
@@ -11,18 +11,18 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}
diff --git a/Examples/perl5/class/example.h b/Examples/perl5/class/example.h
index b0671d583..fd6943541 100644
--- a/Examples/perl5/class/example.h
+++ b/Examples/perl5/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,29 +19,24 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
typedef Square TSquare;
class CFoo
{
public:
- static Square MakeSquare(void) {return Square(4.0);};
- static TSquare MakeTSquare(void) {return Square(4.0);};
+ static Square MakeSquare(void) {return Square(4.0);}
+ static TSquare MakeTSquare(void) {return Square(4.0);}
};
-
-
-
-
-
diff --git a/Examples/perl5/class/example.i b/Examples/perl5/class/example.i
index 23ee8a822..fbdf7249f 100644
--- a/Examples/perl5/class/example.i
+++ b/Examples/perl5/class/example.i
@@ -6,6 +6,4 @@
%}
/* Let's just grab the original header file here */
-
%include "example.h"
-
diff --git a/Examples/perl5/class/index.html b/Examples/perl5/class/index.html
index 58a50ad2e..b4f923b5a 100644
--- a/Examples/perl5/class/index.html
+++ b/Examples/perl5/class/index.html
@@ -32,8 +32,8 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
virtual double area() = 0;
virtual double perimeter() = 0;
@@ -44,7 +44,7 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
+ Circle(double r) : radius(r) { }
virtual double area();
virtual double perimeter();
};
@@ -53,7 +53,7 @@ class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
+ Square(double w) : width(w) { }
virtual double area();
virtual double perimeter();
};
@@ -82,7 +82,7 @@ like this:
Note: when creating a C++ extension, you must run SWIG with the <tt>-c++</tt> option like this:
<blockquote>
<pre>
-% swig -c++ -python example.i
+% swig -c++ -perl example.i
</pre>
</blockquote>
@@ -97,60 +97,45 @@ Click <a href="runme.pl">here</a> to see a script that calls the C++ functions f
<blockquote>
<pre>
-$c = example::new_Circle(10.0);
+$c = new example::Circle(10.0);
</pre>
</blockquote>
<p>
-<li>To access member data, a pair of accessor functions are used.
-For example:
+<li>You can access member data like so:
<blockquote>
<pre>
-example::Shape_x_set($c,15); # Set member data
-$x = example::Shape_x_get($c); # Get member data
+$c-&gt;{x} = 15; # Set member data
+$x = $c-&gt;{x}; # Get member data
</pre>
</blockquote>
-Note: when accessing member data, the name of the class in which
-the data member is defined is used. For example <tt>Shape_x_get()</tt>.
-
<p>
-<li>To invoke a member function, you simply do this
+<li>To invoke a member function, you simply do this:
<blockquote>
<pre>
-print "The area is ", example::Shape_area($c);
+print "The area is ", $c-&gt;area();
</pre>
</blockquote>
<p>
-<li>Type checking knows about the inheritance structure of C++. For example:
+<li>To invoke a destructor, simply do this:
<blockquote>
<pre>
-example::Shape_area($c); # Works (c is a Shape)
-example::Circle_area($c); # Works (c is a Circle)
-example::Square_area($c); # Fails (c is definitely not a Square)
+$c-&gt;DESTROY(); # Deletes a shape
</pre>
</blockquote>
<p>
-<li>To invoke a destructor, simply do this
+<li>Static member variables are wrapped like so:
<blockquote>
<pre>
-example::delete_Shape($c); # Deletes a shape
-</pre>
-</blockquote>
-
-<p>
-<li>Static member variables are wrapped as C global variables. For example:
-
-<blockquote>
-<pre>
-$n = $example::Shape_nshapes; # Get a static data member
-$example::Shapes_nshapes = 13; # Set a static data member
+$n = $example::Shape::nshapes; # Get a static data member
+$example::Shapes::nshapes = 13; # Set a static data member
</pre>
</blockquote>
@@ -159,47 +144,11 @@ $example::Shapes_nshapes = 13; # Set a static data member
<h2>General Comments</h2>
<ul>
-<li>This low-level interface is not the only way to handle C++ code. Proxy classes
-provide a much higher-level interface.
-
-<p>
-<li>SWIG *does* know how to properly perform upcasting of objects in an inheritance
+<li>SWIG <b>does</b> know how to properly perform upcasting of objects in an inheritance
hierarchy (including multiple inheritance). Therefore it is perfectly safe to pass
an object of a derived class to any function involving a base class.
-<p>
-<li>A wide variety of C++ features are not currently supported by SWIG. Here is the
-short and incomplete list:
-
-<p>
-<ul>
-<li>Overloaded methods and functions. SWIG wrappers don't know how to resolve name
-conflicts so you must give an alternative name to any overloaded method name using the
-%name directive like this:
-
-<blockquote>
-<pre>
-void foo(int a);
-%name(foo2) void foo(double a, double b);
-</pre>
-</blockquote>
-
-<p>
-<li>Overloaded operators. Not supported at all. The only workaround for this is
-to write a helper function. For example:
-
-<blockquote>
-<pre>
-%inline %{
- Vector *vector_add(Vector *a, Vector *b) {
- ... whatever ...
- }
-%}
-</pre>
-</blockquote>
-
-<p>
-<li>Namespaces. Not supported at all. Won't be supported until SWIG2.0 (if at all).
+<li>C++ Namespaces - %nspace isn't yet supported for Perl.
</ul>
diff --git a/Examples/perl5/class/runme.pl b/Examples/perl5/class/runme.pl
index 076e1437b..e45e2b8ce 100644
--- a/Examples/perl5/class/runme.pl
+++ b/Examples/perl5/class/runme.pl
@@ -40,7 +40,7 @@ foreach $o ($c,$s) {
print " $o\n";
print " area = ", $o->area(), "\n";
print " perimeter = ", $o->perimeter(), "\n";
- }
+}
# ----- Delete everything -----
diff --git a/Examples/php/class/example.cxx b/Examples/php/class/example.cxx
index f171f10e9..046304519 100644
--- a/Examples/php/class/example.cxx
+++ b/Examples/php/class/example.cxx
@@ -1,14 +1,7 @@
-/* File : example.c */
+/* File : example.cxx */
#include "example.h"
-#include <math.h>
-#ifndef M_PI
-# define M_PI 3.14159265358979323846
-#endif
-
-int Shape::get_nshapes() {
- return nshapes;
-}
+#define M_PI 3.14159265358979323846
/* Move the shape to a new location */
void Shape::move(double dx, double dy) {
@@ -18,22 +11,18 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-void Circle::set_radius( double r ) {
- radius = r;
-}
-
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}
diff --git a/Examples/php/class/example.h b/Examples/php/class/example.h
index 02eaf7232..0dff185b2 100644
--- a/Examples/php/class/example.h
+++ b/Examples/php/class/example.h
@@ -10,10 +10,9 @@ public:
}
double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
- static int get_nshapes();
};
class Circle : public Shape {
@@ -21,10 +20,8 @@ private:
double radius;
public:
Circle(double r) : radius(r) { }
- ~Circle() { }
- void set_radius( double r );
- virtual double area(void);
- virtual double perimeter(void);
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
@@ -32,7 +29,6 @@ private:
double width;
public:
Square(double w) : width(w) { }
- ~Square() { }
- virtual double area(void);
- virtual double perimeter(void);
+ virtual double area();
+ virtual double perimeter();
};
diff --git a/Examples/php/class/example.i b/Examples/php/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/php/class/example.i
+++ b/Examples/php/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/php/class/runme.php b/Examples/php/class/runme.php
index 12b686052..99c253b46 100644
--- a/Examples/php/class/runme.php
+++ b/Examples/php/class/runme.php
@@ -14,7 +14,7 @@ print " Created square\n";
# ----- Access a static member -----
-print "\nA total of " . Shape::get_nshapes() . " shapes were created\n";
+print "\nA total of " . Shape::nshapes() . " shapes were created\n";
# ----- Member data access -----
@@ -54,7 +54,7 @@ $s = NULL;
# the square.
$o = NULL;
-print Shape::get_nshapes() . " shapes remain\n";
+print Shape::nshapes() . " shapes remain\n";
print "Goodbye\n";
?>
diff --git a/Examples/pike/class/example.cxx b/Examples/pike/class/example.cxx
index c7a3194a4..046304519 100644
--- a/Examples/pike/class/example.cxx
+++ b/Examples/pike/class/example.cxx
@@ -1,46 +1,28 @@
-/* File : example.c */
+/* File : example.cxx */
#include "example.h"
-
-#include <stdio.h>
-
#define M_PI 3.14159265358979323846
-// Static member initializer
-int Shape::nshapes = 0;
-
-// Constructor
-Shape::Shape() {
- nshapes++;
-}
-
-// Move the shape to a new location
+/* Move the shape to a new location */
void Shape::move(double dx, double dy) {
x += dx;
y += dy;
}
-// Destructor
-Shape::~Shape() {
- nshapes--;
-}
+int Shape::nshapes = 0;
-// Circle area
-double Circle::area() const {
+double Circle::area() {
return M_PI*radius*radius;
}
-// Circle perimeter
-double Circle::perimeter() const {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-// Square area
-double Square::area() const {
+double Square::area() {
return width*width;
}
-// Square perimeter
-double Square::perimeter() const {
+double Square::perimeter() {
return 4*width;
}
diff --git a/Examples/pike/class/example.h b/Examples/pike/class/example.h
index f74a4fefc..0dff185b2 100644
--- a/Examples/pike/class/example.h
+++ b/Examples/pike/class/example.h
@@ -2,12 +2,16 @@
class Shape {
public:
- Shape();
- virtual ~Shape();
- double x, y;
+ Shape() {
+ nshapes++;
+ }
+ virtual ~Shape() {
+ nshapes--;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area() const = 0;
- virtual double perimeter() const = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -15,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area() const;
- virtual double perimeter() const;
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area() const;
- virtual double perimeter() const;
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/pike/class/example.i b/Examples/pike/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/pike/class/example.i
+++ b/Examples/pike/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/python/callback/runme.py b/Examples/python/callback/runme.py
index 026e9520b..ddb668407 100644
--- a/Examples/python/callback/runme.py
+++ b/Examples/python/callback/runme.py
@@ -42,7 +42,7 @@ print
print "Adding and calling another Python callback"
print "------------------------------------------"
-# Lets do the same but use the weak reference this time.
+# Let's do the same but use the weak reference this time.
callback = PyCallback().__disown__()
caller.setCallback(callback)
diff --git a/Examples/python/class/example.cxx b/Examples/python/class/example.cxx
index 1e8e203dd..046304519 100644
--- a/Examples/python/class/example.cxx
+++ b/Examples/python/class/example.cxx
@@ -1,4 +1,4 @@
-/* File : example.c */
+/* File : example.cxx */
#include "example.h"
#define M_PI 3.14159265358979323846
@@ -11,18 +11,18 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}
diff --git a/Examples/python/class/example.h b/Examples/python/class/example.h
index 46d901361..0dff185b2 100644
--- a/Examples/python/class/example.h
+++ b/Examples/python/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/python/class/example.i b/Examples/python/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/python/class/example.i
+++ b/Examples/python/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/python/class/index.html b/Examples/python/class/index.html
index 12c5eded1..2e1baa395 100644
--- a/Examples/python/class/index.html
+++ b/Examples/python/class/index.html
@@ -12,9 +12,7 @@
<H2>Wrapping a simple C++ class</H2>
<p>
-This example illustrates the most primitive form of C++ class wrapping performed
-by SWIG. In this case, C++ classes are simply transformed into a collection of
-C-style functions that provide access to class members.
+This example illustrates wrapping a simple C++ class to give a Python class.
<h2>The C++ Code</h2>
@@ -32,8 +30,8 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
virtual double area() = 0;
virtual double perimeter() = 0;
@@ -44,7 +42,7 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
+ Circle(double r) : radius(r) { }
virtual double area();
virtual double perimeter();
};
@@ -53,7 +51,7 @@ class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
+ Square(double w) : width(w) { }
virtual double area();
virtual double perimeter();
};
@@ -102,52 +100,35 @@ c = example.new_Circle(10.0)
</blockquote>
<p>
-<li>To access member data, a pair of accessor functions are used.
+<li>Member variables of the C++ class are wrapped as attributes of the Python class.
For example:
<blockquote>
<pre>
-example.Shape_x_set(c,15) # Set member data
-x = example.Shape_x_get(c) # Get member data
+c.x = 15 # Set member data
+x = c.x # Get member data
</pre>
</blockquote>
-Note: when accessing member data, the name of the class in which
-the member data was must be used. In this case, <tt>Shape_x_get()</tt>
-and <tt>Shape_x_set()</tt> are used since 'x' was defined in Shape.
-
<p>
-<li>To invoke a member function, you simply do this
+<li>Member function are invoked as you would expect:
<blockquote>
<pre>
-print "The area is ", example.Shape_area(c)
+print "The area is ", c.area()
</pre>
</blockquote>
<p>
-<li>Type checking knows about the inheritance structure of C++. For example:
+<li>To invoke a destructor, simply call <code>del</code> on the object:
<blockquote>
<pre>
-example.Shape_area(c) # Works (c is a Shape)
-example.Circle_area(c) # Works (c is a Circle)
-example.Square_area(c) # Fails (c is definitely not a Square)
+del c # Deletes a shape
</pre>
</blockquote>
<p>
-<li>To invoke a destructor, simply do this
-
-<blockquote>
-<pre>
-example.delete_Shape(c) # Deletes a shape
-</pre>
-</blockquote>
-
-(Note: destructors are currently not inherited. This might change later).
-
-<p>
<li>Static member variables are wrapped as C global variables. For example:
<blockquote>
@@ -162,52 +143,12 @@ example.cvar.Shapes_nshapes = 13 # Set a static data member
<h2>General Comments</h2>
<ul>
-<li>This low-level interface is not the only way to handle C++ code.
-Proxy classes provide a much higher-level interface.
-
-<p>
-<li>SWIG *does* know how to properly perform upcasting of objects in
+<li>SWIG <b>does</b> know how to properly perform upcasting of objects in
an inheritance hierarchy (including multiple inheritance). Therefore
it is perfectly safe to pass an object of a derived class to any
function involving a base class.
-<p>
-<li>A wide variety of C++ features are not currently supported by SWIG. Here is the
-short and incomplete list:
-
-<p>
-<ul>
-<li>Overloaded methods and functions. SWIG wrappers don't know how to resolve name
-conflicts so you must give an alternative name to any overloaded method name using the
-%name directive like this:
-
-<blockquote>
-<pre>
-void foo(int a);
-%name(foo2) void foo(double a, double b);
-</pre>
-</blockquote>
-
-<p>
-<li>Overloaded operators. Not supported at all. The only workaround for this is
-to write a helper function. For example:
-
-<blockquote>
-<pre>
-%inline %{
- Vector *vector_add(Vector *a, Vector *b) {
- ... whatever ...
- }
-%}
-</pre>
-</blockquote>
-
-<p>
-<li>Namespaces. Not supported at all. Won't be supported until SWIG2.0 (if at all).
-
-<p>
-<li>Dave's snide remark: Like a large bottle of strong Tequilla, it's better to
-use C++ in moderation.
+<li>C++ Namespaces - %nspace isn't yet supported for Python.
</ul>
diff --git a/Examples/python/class/runme.py b/Examples/python/class/runme.py
index f1272ae81..8f4f27eb9 100644
--- a/Examples/python/class/runme.py
+++ b/Examples/python/class/runme.py
@@ -38,6 +38,8 @@ for o in [c,s]:
print " ", o
print " area = ", o.area()
print " perimeter = ", o.perimeter()
+# prevent o from holding a reference to the last object looked at
+o = None
print "\nGuess I'll clean up now"
@@ -45,7 +47,5 @@ print "\nGuess I'll clean up now"
del c
del s
-s = 3
print example.cvar.Shape_nshapes,"shapes remain"
print "Goodbye"
-
diff --git a/Examples/python/index.html b/Examples/python/index.html
index 37f4b55af..3bbdd66e8 100644
--- a/Examples/python/index.html
+++ b/Examples/python/index.html
@@ -56,8 +56,7 @@ Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
</blockquote>
<li>The politically "correct" way to compile a Python extension is to follow the steps
-described at <a href="http://www.python.org/doc/current/ext/building-on-unix.html">www.python.org</a>
-or in the most excellent (and shamelessly plugged) <a href="http://islab.cs.uchicago.edu/python">Python Essential Reference</a>:
+described at <a href="http://docs.python.org/2.0/ext/building-on-unix.html">www.python.org</a>:
<p>
<ol>
diff --git a/Examples/python/multimap/example.i b/Examples/python/multimap/example.i
index 3f6fc3db3..cc2482cc8 100644
--- a/Examples/python/multimap/example.i
+++ b/Examples/python/multimap/example.i
@@ -98,7 +98,7 @@ extern int count(char *bytes, int len, char c);
/* This example shows how to wrap a function that mutates a string */
/* Since str is modified, we make a copy of the Python object
- so that we don't violate it's mutability */
+ so that we don't violate its mutability */
%typemap(in) (char *str, int len) {
%#if PY_VERSION_HEX >= 0x03000000
diff --git a/Examples/r/class/example.h b/Examples/r/class/example.h
index 46d901361..0dff185b2 100644
--- a/Examples/r/class/example.h
+++ b/Examples/r/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/r/class/example.i b/Examples/r/class/example.i
index 4654d269f..fbdf7249f 100644
--- a/Examples/r/class/example.i
+++ b/Examples/r/class/example.i
@@ -1,9 +1,9 @@
/* File : example.i */
%module example
-%inline %{
+%{
#include "example.h"
%}
-%include "example.h"
-
+/* Let's just grab the original header file here */
+%include "example.h"
diff --git a/Examples/ruby/class/example.cxx b/Examples/ruby/class/example.cxx
index 1e8e203dd..046304519 100644
--- a/Examples/ruby/class/example.cxx
+++ b/Examples/ruby/class/example.cxx
@@ -1,4 +1,4 @@
-/* File : example.c */
+/* File : example.cxx */
#include "example.h"
#define M_PI 3.14159265358979323846
@@ -11,18 +11,18 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}
diff --git a/Examples/ruby/class/example.h b/Examples/ruby/class/example.h
index 46d901361..0dff185b2 100644
--- a/Examples/ruby/class/example.h
+++ b/Examples/ruby/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/ruby/class/example.i b/Examples/ruby/class/example.i
index 75700b305..fbdf7249f 100644
--- a/Examples/ruby/class/example.i
+++ b/Examples/ruby/class/example.i
@@ -7,4 +7,3 @@
/* Let's just grab the original header file here */
%include "example.h"
-
diff --git a/Examples/ruby/class/index.html b/Examples/ruby/class/index.html
index 67eeac9ad..927c00190 100644
--- a/Examples/ruby/class/index.html
+++ b/Examples/ruby/class/index.html
@@ -12,9 +12,7 @@
<H2>Wrapping a simple C++ class</H2>
<p>
-This example illustrates C++ class wrapping performed by SWIG.
-C++ classes are simply transformed into Ruby classes that provide methods to
-access class members.
+This example illustrates wrapping a simple C++ class to give a Ruby class.
<h2>The C++ Code</h2>
@@ -32,8 +30,8 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
virtual double area() = 0;
virtual double perimeter() = 0;
@@ -44,7 +42,7 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
+ Circle(double r) : radius(r) { }
virtual double area();
virtual double perimeter();
};
@@ -53,7 +51,7 @@ class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
+ Square(double w) : width(w) { }
virtual double area();
virtual double perimeter();
};
@@ -122,10 +120,8 @@ print "The area is ", c.area, "\n"
</blockquote>
<p>
-<li>When a instance of Ruby level wrapper class is garbage collected by
+<li>When a instance of Ruby level wrapper class is garbage collected by the
Ruby interpreter, the corresponding C++ destructor is automatically invoked.
-(Note: destructors are currently not inherited. This might change later.
-Until then, use <tt>-make_default</tt>).
<p>
<li>Static member variables are wrapped as Ruby class accessor methods.
@@ -144,53 +140,14 @@ Shapes.nshapes = 13 # Set a static data member
<ul>
<li>Ruby module of SWIG differs from other language modules in wrapping C++
-interfaces. They provides lower-level interfaces and optional higher-level
+interfaces. They provide lower-level interfaces and optional higher-level
interfaces know as proxy classes. Ruby module needs no such redundancy
due to Ruby's sophisticated extension API.
-<p>
-<li>SWIG *does* know how to properly perform upcasting of objects in
+<li>SWIG <b>does</b> know how to properly perform upcasting of objects in
an inheritance hierarchy except for multiple inheritance.
-<p>
-<li>A wide variety of C++ features are not currently supported by SWIG. Here is the
-short and incomplete list:
-
-<p>
-<ul>
-<li>Overloaded methods and functions. SWIG wrappers don't know how to resolve name
-conflicts so you must give an alternative name to any overloaded method name using the
-%name directive like this:
-
-<blockquote>
-<pre>
-void foo(int a);
-%name(foo2) void foo(double a, double b);
-</pre>
-</blockquote>
-
-<p>
-<li>Overloaded operators. Not supported at all. The only workaround for this is
-to write a helper function. For example:
-
-<blockquote>
-<pre>
-%inline %{
- Vector *vector_add(Vector *a, Vector *b) {
- ... whatever ...
- }
-%}
-</pre>
-</blockquote>
-
-<p>
-<li>Namespaces. Not supported at all. Won't be supported until SWIG2.0 (if at all).
-
-</ul>
-<p>
-
-<li>Dave's snide remark: Like a large bottle of strong Tequilla, it's better to
-use C++ in moderation.
+<li>C++ Namespaces - %nspace isn't yet supported for Ruby.
</ul>
diff --git a/Examples/ruby/class/runme.rb b/Examples/ruby/class/runme.rb
index de73bcd46..971e149d5 100644
--- a/Examples/ruby/class/runme.rb
+++ b/Examples/ruby/class/runme.rb
@@ -45,5 +45,9 @@ end
# Notice how the Shape#area() and Shape#perimeter() functions really
# invoke the appropriate virtual method on each object.
+# Remove references to the object and force a garbage collection run.
+c = s = o = nil
+GC.start()
+
print "\n", Example::Shape.nshapes," shapes remain\n"
print "Goodbye\n"
diff --git a/Examples/ruby/index.html b/Examples/ruby/index.html
index f04146e56..4f4aa0ad2 100644
--- a/Examples/ruby/index.html
+++ b/Examples/ruby/index.html
@@ -1,4 +1,4 @@
-
+<html>
<head>
<title>SWIG:Examples:ruby</title>
</head>
diff --git a/Examples/tcl/class/example.cxx b/Examples/tcl/class/example.cxx
index 1e8e203dd..046304519 100644
--- a/Examples/tcl/class/example.cxx
+++ b/Examples/tcl/class/example.cxx
@@ -1,4 +1,4 @@
-/* File : example.c */
+/* File : example.cxx */
#include "example.h"
#define M_PI 3.14159265358979323846
@@ -11,18 +11,18 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
-double Circle::area(void) {
+double Circle::area() {
return M_PI*radius*radius;
}
-double Circle::perimeter(void) {
+double Circle::perimeter() {
return 2*M_PI*radius;
}
-double Square::area(void) {
+double Square::area() {
return width*width;
}
-double Square::perimeter(void) {
+double Square::perimeter() {
return 4*width;
}
diff --git a/Examples/tcl/class/example.h b/Examples/tcl/class/example.h
index 46d901361..0dff185b2 100644
--- a/Examples/tcl/class/example.h
+++ b/Examples/tcl/class/example.h
@@ -7,11 +7,11 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
- virtual double area(void) = 0;
- virtual double perimeter(void) = 0;
+ virtual double area() = 0;
+ virtual double perimeter() = 0;
static int nshapes;
};
@@ -19,21 +19,16 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Circle(double r) : radius(r) { }
+ virtual double area();
+ virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
- virtual double area(void);
- virtual double perimeter(void);
+ Square(double w) : width(w) { }
+ virtual double area();
+ virtual double perimeter();
};
-
-
-
-
-
diff --git a/Examples/tcl/class/example.i b/Examples/tcl/class/example.i
index 23ee8a822..fbdf7249f 100644
--- a/Examples/tcl/class/example.i
+++ b/Examples/tcl/class/example.i
@@ -6,6 +6,4 @@
%}
/* Let's just grab the original header file here */
-
%include "example.h"
-
diff --git a/Examples/tcl/class/index.html b/Examples/tcl/class/index.html
index fd8cfe502..16dbeea4f 100644
--- a/Examples/tcl/class/index.html
+++ b/Examples/tcl/class/index.html
@@ -32,8 +32,8 @@ public:
}
virtual ~Shape() {
nshapes--;
- };
- double x, y;
+ }
+ double x, y;
void move(double dx, double dy);
virtual double area() = 0;
virtual double perimeter() = 0;
@@ -44,7 +44,7 @@ class Circle : public Shape {
private:
double radius;
public:
- Circle(double r) : radius(r) { };
+ Circle(double r) : radius(r) { }
virtual double area();
virtual double perimeter();
};
@@ -53,7 +53,7 @@ class Square : public Shape {
private:
double width;
public:
- Square(double w) : width(w) { };
+ Square(double w) : width(w) { }
virtual double area();
virtual double perimeter();
};
@@ -91,10 +91,10 @@ Note: when creating a C++ extension, you must run SWIG with the <tt>-c++</tt> op
SWIG performs two forms of C++ wrapping-- a low level interface and a high level widget-like interface.
<ul>
<li>
-Click <a href="example1.tcl">here</a> to see a script that calls the C++ functions using the
+Click <a href="runme.tcl">here</a> to see a script that calls the C++ functions using the
low-level interface.
<li>
-Click <a href="example2.tcl">here</a> to see a the same script written with the high-level
+Click <a href="runme2.tcl">here</a> to see the same script written with the high-level
interface.
</ul>
@@ -225,47 +225,15 @@ set Shapes_nshapes 13 # Set a static data member
<h2>General Comments</h2>
<ul>
+
<li>The low-level function interface is much faster than the high-level interface.
In fact, all the higher level interface does is call functions in the low-level interface.
-<p>
-<li>SWIG *does* know how to properly perform upcasting of objects in an inheritance
+<li>SWIG <b>does</b> know how to properly perform upcasting of objects in an inheritance
hierarchy (including multiple inheritance). Therefore it is perfectly safe to pass
an object of a derived class to any function involving a base class.
-<p>
-<li>A wide variety of C++ features are not currently supported by SWIG. Here is the
-short and incomplete list:
-
-<p>
-<ul>
-<li>Overloaded methods and functions. SWIG wrappers don't know how to resolve name
-conflicts so you must give an alternative name to any overloaded method name using the
-%name directive like this:
-
-<blockquote>
-<pre>
-void foo(int a);
-%name(foo2) void foo(double a, double b);
-</pre>
-</blockquote>
-
-<p>
-<li>Overloaded operators. Not supported at all. The only workaround for this is
-to write a helper function. For example:
-
-<blockquote>
-<pre>
-%inline %{
- Vector *vector_add(Vector *a, Vector *b) {
- ... whatever ...
- }
-%}
-</pre>
-</blockquote>
-
-<p>
-<li>Namespaces. Not supported at all. Won't be supported until SWIG2.0 (if at all).
+<li>C++ Namespaces - %nspace isn't yet supported for Tcl.
</ul>
diff --git a/Examples/test-suite/chicken/Makefile.in b/Examples/test-suite/chicken/Makefile.in
index 42fe6100a..3c2f3de54 100644
--- a/Examples/test-suite/chicken/Makefile.in
+++ b/Examples/test-suite/chicken/Makefile.in
@@ -69,17 +69,17 @@ SWIGOPT += -nounit
$(run_testcase)
%.cppproxy:
- echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy"
+ echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test) with -proxy"
+$(swig_and_compile_cpp)
$(run_testcase)
%.cproxy:
- echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy"
+ echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test) with -proxy"
+$(swig_and_compile_c)
$(run_testcase)
%.multiproxy:
- echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy"
+ echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test) with -proxy"
+$(swig_and_compile_multi_cpp)
$(run_testcase)
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index 836984476..6ea80670d 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -708,9 +708,9 @@ swig_and_compile_runtime = \
setup = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- echo "$(ACTION)ing testcase $* (with run test) under $(LANGUAGE)" ; \
+ echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
- echo "$(ACTION)ing testcase $* under $(LANGUAGE)" ; \
+ echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
fi;
diff --git a/Examples/test-suite/csharp/Makefile.in b/Examples/test-suite/csharp/Makefile.in
index 4284a775d..993699bc8 100644
--- a/Examples/test-suite/csharp/Makefile.in
+++ b/Examples/test-suite/csharp/Makefile.in
@@ -58,9 +58,9 @@ csharp_swig2_compatibility.cpptest: SWIGOPT += -DSWIG2_CSHARP
# Makes a directory for the testcase if it does not exist
setup = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- echo "$(ACTION)ing testcase $* (with run test) under $(LANGUAGE)" ; \
+ echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
- echo "$(ACTION)ing testcase $* under $(LANGUAGE)" ; \
+ echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
fi; \
if [ ! -d $* ]; then \
mkdir $*; \
diff --git a/Examples/test-suite/d/Makefile.in b/Examples/test-suite/d/Makefile.in
index 8128e4f7a..61c2749dc 100644
--- a/Examples/test-suite/d/Makefile.in
+++ b/Examples/test-suite/d/Makefile.in
@@ -46,9 +46,9 @@ SWIGOPT+=-splitproxy -package $*
# Makes a directory for the testcase if it does not exist
setup = \
if [ -f $(srcdir)/$(TESTPREFIX)$*$(TESTSUFFIX) ]; then \
- echo "$(ACTION)ing testcase $* (with run test) under $(LANGUAGE)" ; \
+ echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
- echo "$(ACTION)ing testcase $* under $(LANGUAGE)" ; \
+ echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
fi; \
if [ ! -d $*$(VERSIONSUFFIX) ]; then \
mkdir $*$(VERSIONSUFFIX); \
diff --git a/Examples/test-suite/errors/swig_fragment_missing.i b/Examples/test-suite/errors/swig_fragment_missing.i
new file mode 100644
index 000000000..e1e83350b
--- /dev/null
+++ b/Examples/test-suite/errors/swig_fragment_missing.i
@@ -0,0 +1,4 @@
+%module xxx
+
+%fragment("awol");
+
diff --git a/Examples/test-suite/errors/swig_fragment_missing.stderr b/Examples/test-suite/errors/swig_fragment_missing.stderr
new file mode 100644
index 000000000..1debb0090
--- /dev/null
+++ b/Examples/test-suite/errors/swig_fragment_missing.stderr
@@ -0,0 +1 @@
+swig_fragment_missing.i:3: Warning 490: Fragment 'awol' not found.
diff --git a/Examples/test-suite/java/Makefile.in b/Examples/test-suite/java/Makefile.in
index 1bd4b0261..ee0e13fba 100644
--- a/Examples/test-suite/java/Makefile.in
+++ b/Examples/test-suite/java/Makefile.in
@@ -73,9 +73,9 @@ director_nspace_director_name_collision.%: JAVA_PACKAGE = $*Package
# Makes a directory for the testcase if it does not exist
setup = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- echo "$(ACTION)ing testcase $* (with run test) under $(LANGUAGE)" ; \
+ echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
- echo "$(ACTION)ing testcase $* under $(LANGUAGE)" ; \
+ echo "$(ACTION)ing $(LANGUAGE) testcase $* $(LANGUAGE)" ; \
fi; \
if [ ! -d $(JAVA_PACKAGE) ]; then \
mkdir $(JAVA_PACKAGE); \
diff --git a/Examples/test-suite/java/README b/Examples/test-suite/java/README
index b8b7416d9..b4123a840 100644
--- a/Examples/test-suite/java/README
+++ b/Examples/test-suite/java/README
@@ -1,6 +1,6 @@
See ../README for common README file.
-The Java implementation of the test-suite is a little different to the other languages in that all of SWIGs output goes into a subdirectory named after the individual test case. This is so that all the shadow classes can be compiled as Java classes have to go into separate files. Otherwise the Makefile wouldn't know which .java files would be relevant to the testcase. For this to work the testcase must go into a Java package.
+The Java implementation of the test-suite is a little different to the other languages in that all of SWIG's output goes into a subdirectory named after the individual test case. This is so that all the shadow classes can be compiled as Java classes which have to go into separate files. Otherwise the Makefile wouldn't know which .java files would be relevant to the testcase. For this to work the testcase must go into a Java package.
Any testcases which have _runme.java appended after the testcase name will be detected and run.
diff --git a/Examples/test-suite/lua/import.lua b/Examples/test-suite/lua/import.lua
index eaab3b400..2ab2555e7 100644
--- a/Examples/test-suite/lua/import.lua
+++ b/Examples/test-suite/lua/import.lua
@@ -1,7 +1,7 @@
-- import
-- the lua 5.0 loading mechanism is rather poor & relies upon the loadlib() fn
-- the lua 5.1 loading mechanism is simplicity itself
--- for now we need a bridge which will use the correct verion
+-- for now we need a bridge which will use the correct version
function import_5_0(name)
-- imports the file into the program
@@ -13,7 +13,7 @@ function import_5_0(name)
local lib=loadlib(name..'.dll','luaopen_'..name) or loadlib(name..'.so','luaopen_'..name)
assert(lib,"error loading module:"..name)
- lib() -- execute the function: initalising the lib
+ lib() -- execute the function: initialising the lib
assert(rawget(_G,name)~=nil,"no module table found")
end
@@ -25,4 +25,4 @@ if string.sub(_VERSION,1,7)=='Lua 5.0' then
import=import_5_0
else
import=import_5_1
-end \ No newline at end of file
+end
diff --git a/Examples/test-suite/lua/keyword_rename_runme.lua b/Examples/test-suite/lua/keyword_rename_runme.lua
index a9dea466a..1fe5b5756 100644
--- a/Examples/test-suite/lua/keyword_rename_runme.lua
+++ b/Examples/test-suite/lua/keyword_rename_runme.lua
@@ -7,10 +7,6 @@ local env = _ENV -- Lua 5.2
if not env then env = getfenv () end -- Lua 5.1
setmetatable(env, {__index=function (t,i) error("undefined global variable `"..i.."'",2) end})
-
--- assert(kn.end(5) == 5) -- Curretly SWIG/Lua doesn't rename keywords
--- assert(kn.nil(7) == 7)
-
--- But you can always access wrongly named members using string constants
-assert(kn["end"](5) == 5)
-assert(kn["nil"](7) == 7)
+-- Check renaming of Lua keywords
+assert(kn.c_end(5) == 5)
+assert(kn.c_nil(7) == 7)
diff --git a/Lib/allkw.swg b/Lib/allkw.swg
index 99c2969e4..563190e19 100644
--- a/Lib/allkw.swg
+++ b/Lib/allkw.swg
@@ -21,6 +21,7 @@
%include <d/dkw.swg>
%include <go/gokw.swg>
%include <java/javakw.swg>
+%include <lua/luakw.swg>
%include <ocaml/ocamlkw.swg>
%include <perl5/perlkw.swg>
%include <php/phpkw.swg>
diff --git a/Lib/chicken/chickenrun.swg b/Lib/chicken/chickenrun.swg
index 07db41945..f13400181 100644
--- a/Lib/chicken/chickenrun.swg
+++ b/Lib/chicken/chickenrun.swg
@@ -313,7 +313,7 @@ SWIG_Chicken_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
swig_module_info *ret = 0;
C_word sym;
- /* lookup the type pointer... it is stored in it's own symbol table */
+ /* lookup the type pointer... it is stored in its own symbol table */
C_SYMBOL_TABLE *stable = C_find_symbol_table("swig_runtime_data" SWIG_RUNTIME_VERSION);
if (stable != NULL) {
sym = SWIG_Chicken_LookupSymbol(chicken_runtimevar_name, stable);
@@ -333,7 +333,7 @@ SWIG_Chicken_SetModule(swig_module_info *module) {
C_word pointer;
static C_word *space = 0;
- /* type pointer is stored in it's own symbol table */
+ /* type pointer is stored in its own symbol table */
stable = C_find_symbol_table("swig_runtime_data" SWIG_RUNTIME_VERSION);
if (stable == NULL) {
stable = C_new_symbol_table("swig_runtime_data" SWIG_RUNTIME_VERSION, 16);
diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg
index 70e9fd4b4..94a0771ba 100644
--- a/Lib/csharp/csharp.swg
+++ b/Lib/csharp/csharp.swg
@@ -35,10 +35,10 @@ using global::System.Runtime.InteropServices;
/* Pack binary data into a string */
SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
- register const unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ const unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register unsigned char uu = *u;
+ unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
@@ -49,11 +49,11 @@ SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
%fragment("SWIG_UnPackData", "header") {
/* Unpack binary data from a string */
SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
- register unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register char d = *(c++);
- register unsigned char uu;
+ char d = *(c++);
+ unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
diff --git a/Lib/d/dmemberfunctionpointers.swg b/Lib/d/dmemberfunctionpointers.swg
index c33ff3840..c63eca23e 100644
--- a/Lib/d/dmemberfunctionpointers.swg
+++ b/Lib/d/dmemberfunctionpointers.swg
@@ -53,10 +53,10 @@
/* Pack binary data into a string */
SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
- register const unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ const unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register unsigned char uu = *u;
+ unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
@@ -67,11 +67,11 @@ SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
%fragment("SWIG_UnPackData", "header") {
/* Unpack binary data from a string */
SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
- register unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register char d = *(c++);
- register unsigned char uu;
+ char d = *(c++);
+ unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
diff --git a/Lib/java/java.swg b/Lib/java/java.swg
index 84d018083..3d4d83730 100644
--- a/Lib/java/java.swg
+++ b/Lib/java/java.swg
@@ -16,10 +16,10 @@
/* Pack binary data into a string */
SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
- register const unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ const unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register unsigned char uu = *u;
+ unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
@@ -30,11 +30,11 @@ SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
%fragment("SWIG_UnPackData", "header") {
/* Unpack binary data from a string */
SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
- register unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register char d = *(c++);
- register unsigned char uu;
+ char d = *(c++);
+ unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
diff --git a/Lib/lua/lua.swg b/Lib/lua/lua.swg
index 4ea1ac98a..40087236b 100644
--- a/Lib/lua/lua.swg
+++ b/Lib/lua/lua.swg
@@ -9,8 +9,9 @@
* includes
* ----------------------------------------------------------------------------- */
-%include <luatypemaps.swg> /* The typemaps */
+%include <luatypemaps.swg> /* The typemaps */
%include <luaruntime.swg> /* The runtime stuff */
+%include <luakw.swg> /* Warnings for Lua keywords */
//%include <typemaps/swigmacros.swg>
/* -----------------------------------------------------------------------------
diff --git a/Lib/lua/luakw.swg b/Lib/lua/luakw.swg
new file mode 100644
index 000000000..fc2f92bfe
--- /dev/null
+++ b/Lib/lua/luakw.swg
@@ -0,0 +1,67 @@
+/*
+ Warnings for Lua keywords, built-in names and bad names.
+*/
+
+#define LUAKW(x) %keywordwarn("'" `x` "' is a Lua keyword, renaming to 'c_" `x` "'", rename="c_%s") `x`
+#define LUABN(x) %namewarn(%warningmsg(SWIGWARN_PARSE_BUILTIN_NAME, "'" `x` "' conflicts with a basic function in Lua"), %$not %$ismember) `x`
+
+/*
+ Warnings for Lua keywords
+ http://www.lua.org/manual/5.2/manual.html#3.1
+*/
+
+LUAKW(and);
+LUAKW(break);
+LUAKW(do);
+LUAKW(else);
+LUAKW(elseif);
+LUAKW(end);
+LUAKW(false);
+LUAKW(for);
+LUAKW(function);
+LUAKW(goto);
+LUAKW(if);
+LUAKW(in);
+LUAKW(local);
+LUAKW(nil);
+LUAKW(not);
+LUAKW(or);
+LUAKW(repeat);
+LUAKW(return);
+LUAKW(then);
+LUAKW(true);
+LUAKW(until);
+LUAKW(while);
+
+/*
+ Basic functions
+ http://www.lua.org/manual/5.2/manual.html#6.1
+*/
+
+LUABN(assert);
+LUABN(collectgarbage);
+LUABN(dofile);
+LUABN(error);
+LUABN(_G); // Not actually a function
+LUABN(getmetatable);
+LUABN(ipairs);
+LUABN(load);
+LUABN(loadfile);
+LUABN(next);
+LUABN(pairs);
+LUABN(pcall);
+LUABN(print);
+LUABN(rawequal);
+LUABN(rawget);
+LUABN(rawlen);
+LUABN(rawset);
+LUABN(select);
+LUABN(setmetatable);
+LUABN(tonumber);
+LUABN(tostring);
+LUABN(type);
+LUABN(_VERSION); // Not actually a function
+LUABN(xpcall);
+
+#undef LUABN
+#undef LUAKW
diff --git a/Lib/lua/luaruntime.swg b/Lib/lua/luaruntime.swg
index 0f0cd5501..ebb997897 100644
--- a/Lib/lua/luaruntime.swg
+++ b/Lib/lua/luaruntime.swg
@@ -31,7 +31,7 @@ SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
int i;
/* start with global table */
lua_pushglobaltable (L);
- /* SWIG's internal initalisation */
+ /* SWIG's internal initialisation */
SWIG_InitializeModule((void*)L);
SWIG_PropagateClientData();
#endif
diff --git a/Lib/ocaml/swigp4.ml.in b/Lib/ocaml/swigp4.ml
index 2f6074a9e..2f6074a9e 100644
--- a/Lib/ocaml/swigp4.ml.in
+++ b/Lib/ocaml/swigp4.ml
diff --git a/Lib/octave/octcontainer.swg b/Lib/octave/octcontainer.swg
index b14b8c194..723256ca0 100644
--- a/Lib/octave/octcontainer.swg
+++ b/Lib/octave/octcontainer.swg
@@ -26,9 +26,7 @@
// The Octave C++ Wrap
-%insert(header) %{
-#include <stdexcept>
-%}
+%fragment("<stdexcept>");
%include <std_except.i>
diff --git a/Lib/octave/octtypemaps.swg b/Lib/octave/octtypemaps.swg
index e331cf4b3..4acf8e076 100644
--- a/Lib/octave/octtypemaps.swg
+++ b/Lib/octave/octtypemaps.swg
@@ -1,5 +1,5 @@
-// Include fundamental fragemt definitions
+// Include fundamental fragment definitions
%include <typemaps/fragments.swg>
// Look for user fragments file.
diff --git a/Lib/perl5/Makefile.in b/Lib/perl5/Makefile.in
index f11ad2bdf..1fee86ccc 100644
--- a/Lib/perl5/Makefile.in
+++ b/Lib/perl5/Makefile.in
@@ -46,7 +46,7 @@ SWIG = $(exec_prefix)/bin/swig
SWIGOPT = -perl5
SWIGCC = $(CC)
-# SWIG Library files. Uncomment this to staticly rebuild Perl
+# SWIG Library files. Uncomment this to statically rebuild Perl
#SWIGLIBS = -static -lperlmain.i
# Rules for creating .o files from source.
diff --git a/Lib/perl5/director.swg b/Lib/perl5/director.swg
index a66869725..714a87877 100644
--- a/Lib/perl5/director.swg
+++ b/Lib/perl5/director.swg
@@ -27,7 +27,6 @@
*/
# ifndef SWIG_DIRECTOR_RTDIR
# define SWIG_DIRECTOR_RTDIR
-#include <map>
namespace Swig {
class Director;
diff --git a/Lib/perl5/perltypemaps.swg b/Lib/perl5/perltypemaps.swg
index f47a5ef82..ffec5eaf1 100644
--- a/Lib/perl5/perltypemaps.swg
+++ b/Lib/perl5/perltypemaps.swg
@@ -18,7 +18,7 @@
#define SWIG_FROM_CALL_ARGS SWIG_PERL_CALL_ARGS_1
-/* Include fundamental fragemt definitions */
+/* Include fundamental fragment definitions */
%include <typemaps/fragments.swg>
/* Look for user fragments file. */
diff --git a/Lib/perl5/std_list.i b/Lib/perl5/std_list.i
index ea264d6a1..8248ca679 100644
--- a/Lib/perl5/std_list.i
+++ b/Lib/perl5/std_list.i
@@ -36,9 +36,9 @@
%{
#include <list>
-#include <algorithm>
-#include <stdexcept>
%}
+%fragment("<algorithm>");
+%fragment("<stdexcept>");
// exported class
diff --git a/Lib/perl5/std_map.i b/Lib/perl5/std_map.i
index e7812f38a..493307dd9 100644
--- a/Lib/perl5/std_map.i
+++ b/Lib/perl5/std_map.i
@@ -12,9 +12,9 @@
%{
#include <map>
-#include <algorithm>
-#include <stdexcept>
%}
+%fragment("<algorithm>");
+%fragment("<stdexcept>");
// exported class
diff --git a/Lib/perl5/std_vector.i b/Lib/perl5/std_vector.i
index a3998ff92..860cdba7e 100644
--- a/Lib/perl5/std_vector.i
+++ b/Lib/perl5/std_vector.i
@@ -32,9 +32,9 @@
%{
#include <vector>
-#include <algorithm>
-#include <stdexcept>
%}
+%fragment("<algorithm>");
+%fragment("<stdexcept>");
// exported class
diff --git a/Lib/python/director.swg b/Lib/python/director.swg
index 50f735a89..90c58c107 100644
--- a/Lib/python/director.swg
+++ b/Lib/python/director.swg
@@ -62,7 +62,6 @@
*/
# ifndef SWIG_DIRECTOR_RTDIR
# define SWIG_DIRECTOR_RTDIR
-#include <map>
namespace Swig {
class Director;
diff --git a/Lib/python/pycontainer.swg b/Lib/python/pycontainer.swg
index d4386622e..dcada87c7 100644
--- a/Lib/python/pycontainer.swg
+++ b/Lib/python/pycontainer.swg
@@ -32,9 +32,7 @@
/**** The PySequence C++ Wrap ***/
-%insert(header) %{
-#include <stdexcept>
-%}
+%fragment("<stdexcept>");
%include <std_except.i>
diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
index 53fc3a75b..a713486d1 100644
--- a/Lib/python/pyrun.swg
+++ b/Lib/python/pyrun.swg
@@ -175,7 +175,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
- register int i;
+ int i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
@@ -185,7 +185,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
return 0;
} else {
- register Py_ssize_t l = PyTuple_GET_SIZE(args);
+ Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
name, (min == max ? "" : "at least "), (int)min, (int)l);
@@ -195,7 +195,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
- register int i;
+ int i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
diff --git a/Lib/ruby/rubycontainer.swg b/Lib/ruby/rubycontainer.swg
index dd6389ce4..69db367d9 100644
--- a/Lib/ruby/rubycontainer.swg
+++ b/Lib/ruby/rubycontainer.swg
@@ -26,9 +26,7 @@
/**** The RubySequence C++ Wrap ***/
-%insert(header) %{
-#include <stdexcept>
-%}
+%fragment("<stdexcept>");
%include <std_except.i>
diff --git a/Lib/ruby/rubytypemaps.swg b/Lib/ruby/rubytypemaps.swg
index 336ee977a..3837df078 100644
--- a/Lib/ruby/rubytypemaps.swg
+++ b/Lib/ruby/rubytypemaps.swg
@@ -8,7 +8,7 @@
#undef SWIG_TYPECHECK_BOOL
%define SWIG_TYPECHECK_BOOL 10000 %enddef
-/* Include fundamental fragemt definitions */
+/* Include fundamental fragment definitions */
%include <typemaps/fragments.swg>
/* Look for user fragments file. */
diff --git a/Lib/std/std_common.i b/Lib/std/std_common.i
index 35baf2206..6e93e29f6 100644
--- a/Lib/std/std_common.i
+++ b/Lib/std/std_common.i
@@ -24,10 +24,8 @@
//
%fragment("<string>");
-%{
-#include <stdexcept>
-#include <stddef.h>
-%}
+%fragment("<stdexcept>");
+%fragment("<stddef.h>");
%fragment("StdIteratorTraits","header",fragment="<stddef.h>") %{
diff --git a/Lib/std/std_map.i b/Lib/std/std_map.i
index e523c3deb..d1f6b3a16 100644
--- a/Lib/std/std_map.i
+++ b/Lib/std/std_map.i
@@ -57,9 +57,9 @@
%{
#include <map>
-#include <algorithm>
-#include <stdexcept>
%}
+%fragment("<algorithm>");
+%fragment("<stdexcept>");
// exported class
diff --git a/Lib/std/std_unordered_map.i b/Lib/std/std_unordered_map.i
index 3d80788e2..8c276172a 100644
--- a/Lib/std/std_unordered_map.i
+++ b/Lib/std/std_unordered_map.i
@@ -60,9 +60,9 @@
%{
#include <unordered_map>
-#include <algorithm>
-#include <stdexcept>
%}
+%fragment("<algorithm>");
+%fragment("<stdexcept>");
// exported class
diff --git a/Lib/swig.swg b/Lib/swig.swg
index 3ddbb85a0..c33ae3854 100644
--- a/Lib/swig.swg
+++ b/Lib/swig.swg
@@ -321,7 +321,7 @@ static int NAME(TYPE x) {
/*
* Function/method overloading support. This is done through typemaps,
- * but also involve a precedence level.
+ * but also involves a precedence level.
*/
/* Macro for overload resolution */
diff --git a/Lib/swiginit.swg b/Lib/swiginit.swg
index f321181eb..69e368ac1 100644
--- a/Lib/swiginit.swg
+++ b/Lib/swiginit.swg
@@ -11,7 +11,7 @@
* array with the correct data and linking the correct swig_cast_info
* structures together.
*
- * The generated swig_type_info structures are assigned staticly to an initial
+ * The generated swig_type_info structures are assigned statically to an initial
* array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the
diff --git a/Lib/swigrun.swg b/Lib/swigrun.swg
index 7066e670e..a314bf239 100644
--- a/Lib/swigrun.swg
+++ b/Lib/swigrun.swg
@@ -404,14 +404,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start;
do {
if (iter->size) {
- register size_t l = 0;
- register size_t r = iter->size - 1;
+ size_t l = 0;
+ size_t r = iter->size - 1;
do {
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
- register size_t i = (l + r) >> 1;
+ size_t i = (l + r) >> 1;
const char *iname = iter->types[i]->name;
if (iname) {
- register int compare = strcmp(name, iname);
+ int compare = strcmp(name, iname);
if (compare == 0) {
return iter->types[i];
} else if (compare < 0) {
@@ -455,7 +455,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */
swig_module_info *iter = start;
do {
- register size_t i = 0;
+ size_t i = 0;
for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i];
@@ -474,10 +474,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
- register const unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ const unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register unsigned char uu = *u;
+ unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
@@ -489,11 +489,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
- register unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register char d = *(c++);
- register unsigned char uu;
+ char d = *(c++);
+ unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
diff --git a/Lib/tcl/std_map.i b/Lib/tcl/std_map.i
index 1b7e7696c..78f6e3276 100644
--- a/Lib/tcl/std_map.i
+++ b/Lib/tcl/std_map.i
@@ -13,9 +13,9 @@
%{
#include <map>
-#include <algorithm>
-#include <stdexcept>
%}
+%fragment("<algorithm>");
+%fragment("<stdexcept>");
// exported class
diff --git a/Lib/tcl/std_vector.i b/Lib/tcl/std_vector.i
index 37e23ba71..3fc0fd61d 100644
--- a/Lib/tcl/std_vector.i
+++ b/Lib/tcl/std_vector.i
@@ -29,10 +29,10 @@
// ------------------------------------------------------------------------
%fragment("<string>");
+%fragment("<stdexcept>");
+%fragment("<algorithm>");
%{
#include <vector>
-#include <algorithm>
-#include <stdexcept>
Tcl_Obj* SwigString_FromString(const std::string &s) {
return Tcl_NewStringObj(s.data(), (int)s.length());
diff --git a/Lib/typemaps/exception.swg b/Lib/typemaps/exception.swg
index 12c4ea658..b60a32996 100644
--- a/Lib/typemaps/exception.swg
+++ b/Lib/typemaps/exception.swg
@@ -52,9 +52,9 @@
}
}
*/
-%{
-#include <stdexcept>
-%}
+
+%fragment("<stdexcept>");
+
%define SWIG_CATCH_STDEXCEPT
/* catching std::exception */
catch (std::invalid_argument& e) {
diff --git a/Lib/typemaps/fragments.swg b/Lib/typemaps/fragments.swg
index ce87c8cc0..447df6e2e 100644
--- a/Lib/typemaps/fragments.swg
+++ b/Lib/typemaps/fragments.swg
@@ -157,6 +157,14 @@
#include <string>
%}
+%fragment("<stdexcept>", "header") %{
+#include <stdexcept>
+%}
+
+%fragment("<algorithm>", "header") %{
+#include <algorithm>
+%}
+
%fragment("SWIG_isfinite","header",fragment="<math.h>,<float.h>") %{
/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
#ifndef SWIG_isfinite
diff --git a/Lib/typemaps/traits.swg b/Lib/typemaps/traits.swg
index 09cc7e295..406f16066 100644
--- a/Lib/typemaps/traits.swg
+++ b/Lib/typemaps/traits.swg
@@ -22,9 +22,7 @@
//
%fragment("<string>");
-%{
-#include <stdexcept>
-%}
+%fragment("<stdexcept>");
%fragment("Traits","header",fragment="<string>")
{
diff --git a/Makefile.in b/Makefile.in
index ea7814242..4407d1316 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -391,7 +391,7 @@ clean-ccache:
# DISTCLEAN - clean what configure built
#####################################################################
-DISTCLEAN-DEAD = config.status config.log config.cache swig.spec Makefile mkmf.log libtool preinst-swig Lib/ocaml/swigp4.ml
+DISTCLEAN-DEAD = config.status config.log config.cache swig.spec Makefile mkmf.log libtool preinst-swig
distclean-helper: distclean-test-suite distclean-examples distclean-dead
diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
index dd8de45ff..1bd351560 100644
--- a/Source/CParse/parser.y
+++ b/Source/CParse/parser.y
@@ -3488,6 +3488,7 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
Setattr($<node>$, "nested:outer", currentOuterClass);
set_access_mode($<node>$);
}
+ Swig_features_get(Swig_cparse_features(), Namespaceprefix, Getattr($<node>$, "name"), 0, $<node>$);
/* save yyrename to the class attribute, to be used later in add_symbols()*/
Setattr($<node>$, "class_rename", make_name($<node>$, $3, 0));
Setattr($<node>$, "Classprefix", $3);
@@ -3631,7 +3632,6 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
Delattr($<node>$, "Classprefix");
Delete(Namespaceprefix);
Namespaceprefix = Swig_symbol_qualifiedscopename(0);
- Swig_features_get(Swig_cparse_features(), Namespaceprefix, Getattr($$, "name"), 0, $$);
if (cplus_mode == CPLUS_PRIVATE) {
$$ = 0; /* skip private nested classes */
} else if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag($$, "feature:flatnested")) {
@@ -3712,6 +3712,8 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
Setattr($<node>$, "nested:outer", currentOuterClass);
set_access_mode($<node>$);
}
+ Swig_features_get(Swig_cparse_features(), Namespaceprefix, 0, 0, $<node>$);
+ /* save yyrename to the class attribute, to be used later in add_symbols()*/
Setattr($<node>$, "class_rename", make_name($<node>$,0,0));
if (strcmp($2,"class") == 0) {
cplus_mode = CPLUS_PRIVATE;
@@ -3745,7 +3747,6 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
/* Check for pure-abstract class */
Setattr($$,"abstracts", pure_abstracts($6));
n = $8;
- Swig_features_get(Swig_cparse_features(), Namespaceprefix, 0, 0, $$);
if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag($$, "feature:flatnested")) {
String *name = n ? Copy(Getattr(n, "name")) : 0;
$$ = nested_forward_declaration($1, $2, 0, name, n);
diff --git a/Source/CParse/templ.c b/Source/CParse/templ.c
index 48bdf4faa..fe8fc2800 100644
--- a/Source/CParse/templ.c
+++ b/Source/CParse/templ.c
@@ -825,7 +825,7 @@ Node *Swig_cparse_template_locate(String *name, Parm *tparms, Symtab *tscope) {
/* If not a templated class we must have a templated function.
The template found is not necessarily the one we want when dealing with templated
functions. We don't want any specialized templated functions as they won't have
- the default parameters. Lets look for the unspecialized template. Also make sure
+ the default parameters. Let's look for the unspecialized template. Also make sure
the number of template parameters is correct as it is possible to overload a
templated function with different numbers of template parameters. */
diff --git a/Source/Modules/typepass.cxx b/Source/Modules/typepass.cxx
index 49f95090d..329a601a8 100644
--- a/Source/Modules/typepass.cxx
+++ b/Source/Modules/typepass.cxx
@@ -476,7 +476,7 @@ class TypePass:private Dispatcher {
if (unnamed && tdname && (Cmp(storage, "typedef") == 0)) {
SwigType_typedef(unnamed, tdname);
}
- // name of the outer class should already be patched to contain it's outer classes names, but not to contain namespaces
+ // name of the outer class should already be patched to contain its outer classes names, but not to contain namespaces
// namespace name (if present) is added after processing child nodes
if (Getattr(n, "nested:outer") && name) {
String *outerName = Getattr(Getattr(n, "nested:outer"), "name");
diff --git a/Source/Swig/fragment.c b/Source/Swig/fragment.c
index 927c772b8..5b30e86e0 100644
--- a/Source/Swig/fragment.c
+++ b/Source/Swig/fragment.c
@@ -94,16 +94,16 @@ void Swig_fragment_emit(Node *n) {
String *name = 0;
String *type = 0;
+ name = Getattr(n, "value");
+ if (!name) {
+ name = n;
+ }
+
if (!fragments) {
Swig_warning(WARN_FRAGMENT_NOT_FOUND, Getfile(n), Getline(n), "Fragment '%s' not found.\n", name);
return;
}
-
- name = Getattr(n, "value");
- if (!name) {
- name = n;
- }
type = Getattr(n, "type");
if (type) {
mangle = Swig_string_mangle(type);
diff --git a/Source/Swig/typeobj.c b/Source/Swig/typeobj.c
index 903d1357c..622eac118 100644
--- a/Source/Swig/typeobj.c
+++ b/Source/Swig/typeobj.c
@@ -240,7 +240,7 @@ String *SwigType_parm(const SwigType *t) {
/* -----------------------------------------------------------------------------
* SwigType_split()
*
- * Splits a type into it's component parts and returns a list of string.
+ * Splits a type into its component parts and returns a list of string.
* ----------------------------------------------------------------------------- */
List *SwigType_split(const SwigType *t) {
diff --git a/configure.ac b/configure.ac
index bb62068ae..f3414969e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@ AH_BOTTOM([
/* Default language */
#define SWIG_LANG "-tcl"
-/* Deal with Microsofts attempt at deprecating C standard runtime functions */
+/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if defined(_MSC_VER)
# define _CRT_SECURE_NO_DEPRECATE
#endif
@@ -2409,35 +2409,34 @@ case $build in
esac
AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)])
-AC_CONFIG_FILES([ \
- Makefile \
- swig.spec \
- Source/Makefile \
- Examples/Makefile \
- Examples/xml/Makefile \
- Examples/test-suite/errors/Makefile \
- Examples/test-suite/chicken/Makefile \
- Examples/test-suite/csharp/Makefile \
- Examples/test-suite/d/Makefile \
- Examples/test-suite/guile/Makefile \
- Examples/test-suite/java/Makefile \
- Examples/test-suite/mzscheme/Makefile \
- Examples/test-suite/ocaml/Makefile \
- Examples/test-suite/octave/Makefile \
- Examples/test-suite/perl5/Makefile \
- Examples/test-suite/php/Makefile \
- Examples/test-suite/pike/Makefile \
- Examples/test-suite/python/Makefile \
- Examples/test-suite/ruby/Makefile \
- Examples/test-suite/tcl/Makefile \
- Examples/test-suite/lua/Makefile \
- Examples/test-suite/allegrocl/Makefile \
- Examples/test-suite/clisp/Makefile \
- Examples/test-suite/cffi/Makefile \
- Examples/test-suite/uffi/Makefile \
- Examples/test-suite/r/Makefile \
- Examples/test-suite/go/Makefile \
- Lib/ocaml/swigp4.ml
+AC_CONFIG_FILES([
+ Makefile
+ swig.spec
+ Source/Makefile
+ Examples/Makefile
+ Examples/xml/Makefile
+ Examples/test-suite/errors/Makefile
+ Examples/test-suite/chicken/Makefile
+ Examples/test-suite/csharp/Makefile
+ Examples/test-suite/d/Makefile
+ Examples/test-suite/guile/Makefile
+ Examples/test-suite/java/Makefile
+ Examples/test-suite/mzscheme/Makefile
+ Examples/test-suite/ocaml/Makefile
+ Examples/test-suite/octave/Makefile
+ Examples/test-suite/perl5/Makefile
+ Examples/test-suite/php/Makefile
+ Examples/test-suite/pike/Makefile
+ Examples/test-suite/python/Makefile
+ Examples/test-suite/ruby/Makefile
+ Examples/test-suite/tcl/Makefile
+ Examples/test-suite/lua/Makefile
+ Examples/test-suite/allegrocl/Makefile
+ Examples/test-suite/clisp/Makefile
+ Examples/test-suite/cffi/Makefile
+ Examples/test-suite/uffi/Makefile
+ Examples/test-suite/r/Makefile
+ Examples/test-suite/go/Makefile
])
AC_CONFIG_FILES([preinst-swig], [chmod +x preinst-swig])
AC_CONFIG_FILES([CCache/ccache_swig_config.h])