OpenVPN build, SWiG cannot find header files

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
User avatar
XXvevo
OpenVpn Newbie
Posts: 3
Joined: Fri Jun 16, 2017 7:37 pm

OpenVPN build, SWiG cannot find header files

Post by XXvevo » Sat Nov 10, 2018 8:46 pm

Hello,

I'm currently trying to use SWiG to create an interface for ovpncli.hpp in order to be able to access the API from my C# project.

First of all, I would like to know why Visual Studio (tested with 2015 and 2017) ignores all directories in the OpenVPN project folder as like as shown in the image https://imgur.com/a/cXoj6Nj. I basically added the OpenVPN project to my current project using Visual Studio.

And my main problem is that SWiG ignores all specified headers if I compile the file ovpncli.i with the following command:
C:\swigwin-3.0.12\swig -c++ -csharp -outdir C:\swigwin-3.0.12\Generated ovpncli.i
Please check this image https://imgur.com/a/3hOoy7u

Thank you.

Sincerely,
Chris

User avatar
XXvevo
OpenVpn Newbie
Posts: 3
Joined: Fri Jun 16, 2017 7:37 pm

Re: OpenVPN build, SWiG cannot find header files

Post by XXvevo » Sun Nov 11, 2018 6:34 am

Well, changing the path like this https://imgur.com/a/j3IfDXJ works but it can't solve the other header files now. I guess that's because VisualStudio ignores all directories from OpenVPN project?

Post Reply