Skip to content

inuik/swig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swig example using CMake

Prerequisites

  • Windows 10.
  • CMake 3.12.
  • Visual Studio 2017.
  • Python 2.7.
  • Locally installed SWIG 3.0.12 & added to ENV PATH.

How to build manually

  1. 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
  1. 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

How to build with CMake

  1. Build
mkdir build
cd build
cmake ..
cmake --build . --target install -j
  1. 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

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published