On Fri, 20 May 2005, Ralf [UTF-8] Lübben wrote: > Hello, > > I have a big problem with my programm. > I developed it with a test main function with the > openvpn_plugin_open_v1, openvpn_plugin_func_v1 and openvpn_plugin_close_v1 > function and everything works fine. > I used some c++-libraries and my whole radius stuff is in a c++-class. > When I compile my programm as a shared library with the g++ and use it with > OpenVpn I get the following error: > > Fri May 20 17:34:32 2005 us=538779 PLUGIN: could not find symbol > 'openvpn_plugin_open_v1' in plugin shared > object /root/test/auth-pam.so: /usr/sbin/openvpn: undefined symbol: > openvpn_plugin_open_v1 > > I think the problem is that I use c++, if I compile with the gcc the > openvpn_plugin_open_v1 is found and the c++-objects are not fornd. > > Is it possible to use the c++-classes and my radius classes with shared > libraries in OpenVpn? > At the moment I have no idea to solve this.
You can declare C function prototypes in C++ code with extern "C" { include "openvpn-plugin.h" } to maintain compatibility between the C and C++ namespaces. James