Hello,
Thank you for this good advice, i will follow it !
best regards

At 11:26 20/04/2004, you wrote:
Hi,
I had a similar problem but took a slightly different approach. I had a C++ library that I needed to use from inside an rlm_eap subtype module. Instead of bringing C++ into rlm_eap, I wrote a C wrapper around the C++ API, and call the C function from within freeradius. The wrapper function needs to be C++ so it can invoke methods on C++ objects, and the wrapper header has to have the "#ifdef __cplusplus" so both freeradius and the wrapper body can use it. In the Makefile, you need to add your C++ library and -lstdc++ to RLM_LIBS.


One problem I ran into here is that I have to dynamically link freeradius while my C++ library is statically linked. When I link my rlm, the linker gives a warning but it seems to work. Ideally freeradius will get a fix for the problem that prevents static link for modules that have submodules. :)

Dave

Aurélien Magniez wrote:

Hi,

I also wrote a C++ module under FreeRadius. Look at
this page :
http://lists.cistron.nl/archives/freeradius-devel/2004/04/msg00001.html


Aurélien Magniez





<[EMAIL PROTECTED]> wrote:

At 11:41 19/04/2004, you wrote:


"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:


> Does anyone know how I could compile freeradius in C++ using g++


instead of


> gcc ?



Why? There's no C++ code in FreeRADIUS, so there's no point in using a C++ compiler.



I am writing a module that need to use C++ files that I wish I did not need to rewrite...




> I am not very familiar with the underlying configure mechanism , all i


know


> is to type 'configure' an then 'make' ...



Then you're definitely not going to want to use a C++ compiler.


Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html







- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to