- Windows 10.
- CMake 3.12.
- Visual Studio 2017.
- Python 2.7.
- Locally installed SWIG 3.0.12 & added to ENV PATH.
- Build Python variant
vc141
swig.exe -python -c++ example.i
cl /LD example_wrap.cxx example.cpp /I C:\Python27\include /link /LIBPATH:C:\Python27\libs /out:_example.pyd
python .\runme.py
- Build CSharp variant
vc141
swig.exe -csharp -c++ example.i
cl /LD example_wrap.cxx example.cpp /link /out:example_cs_wrapper.dll
csc -target:library example.cs examplePINVOKE.cs /out:example.dll
csc runme.cs /reference:example.dll
.\runme.exe
- Build
mkdir build
cd build
cmake ..
cmake --build . --target install -j
- Run swig clients
- Python
python .\install\python\runme.py
- CSharp
.\install\csharp\runme.exe
- Alternatively run both swig clients via CTest
ctest -C Debug -V