OpenVPN / openvpn3

OpenVPN 3 is a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.
https://openvpn.net
Other
973 stars 383 forks source link

Cannot move Client class def/impl to separate files. #62

Closed imalyavskiy closed 5 years ago

imalyavskiy commented 5 years ago

Hello I would like to use several cpp files to build this and dependent project. But currently cannot do this because if to include opnvpn headers into at least two cpp files the linker angries with a lot of "already defined in cli.obj" errors. What is the reason for the headers to be designed in this way or is there any way to use the headers in desired manner without changing them?

Thanks in advance.

PS: Working on Win 10.

schwabe commented 5 years ago

Duplicate of #48. See also the openvpn3-linux client as example how to use multiple cpp files and including openvpn3 only once.

imalyavskiy commented 5 years ago

Thanks a lot!