Is it possible to build modules in C++ (g++ compiler)?<div>I have taken the rlm_example.c file, renamed as cpp and then run make and I see some errors reported in the libradius header files.</div><div>Before I spend time trying to figure out what the errors are, just wanted to make sure that this has been done before.</div>
<div><br></div><div>Here are the errors reported in any case...</div><div><br></div><div><div>g++ -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -DIE_LIBTOOL_DIE -I/home/marcose/Downloads/freeradius-server-2.1.8/src -I/usr/include -c rlm_grid.cpp  -fPIC -DPIC -o .libs/rlm_grid.o</div>
<div>In file included from /home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/radiusd.h:30,</div><div>from rlm_grid.cpp:27:</div><div>/home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/libradius.h:160: error: expected type-specifier before ';' token</div>
<div>/home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/libradius.h:339: error: expected ')' before 'operator'</div><div>/home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/libradius.h:339: error: expected initializer before 'operator'</div>
<div>In file included from /home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/radiusd.h:33,</div><div>from rlm_grid.cpp:27:</div><div>/home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/conffile.h:94: error: expected ',' or '...' before 'template'</div>
<div>In file included from rlm_grid.cpp:27:</div><div>/home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/radiusd.h:246: error: declaration of 'home_server* auth_req::home_server'</div><div>/home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/realms.h:88: error: changes meaning of 'home_server' from 'typedef struct home_server home_server'</div>
<div>/home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/radiusd.h:582: error: expected ')' before 'operator'</div><div>/home/marcose/Downloads/freeradius-server-2.1.8/src/freeradius-devel/radiusd.h:582: error: expected initializer before 'operator'</div>
<div>rlm_grid.cpp: In function 'int grid_instantiate(CONF_SECTION*, void**)':</div><div>rlm_grid.cpp:76: error: invalid conversion from 'void*' to 'rlm_grid_t*'</div><div>rlm_grid.cpp: In function 'int grid_authorize(void*, REQUEST*)':</div>
<div>rlm_grid.cpp:108: error: 'pairmake' was not declared in this scope</div><div>make: *** [rlm_grid.lo] Error 1</div><div><br></div></div>