Module for FreeRADIUS wirtten in C++

krzychk2 krzychk2 at tlen.pl
Mon Jul 20 22:11:32 CEST 2009


Hi.

I have written a module for FreeRADIUS in C++. Now I have a big problem
with compilation. 

When I am trying to compile the attached file by g++ and I have the
following error: 

g++ -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_GNU_SOURCE -DNDEBUG
-I/usr/local/include -I/usr/include/mysql++ -I/usr/include/mysql -O2 -g
-Wall -c -fmessage-length=0 -MMD -MP -MF"src/rlm_tokensms.d"
-MT"src/rlm_tokensms.d" -o"src/rlm_tokensms.o" "../src/rlm_tokensms.cpp"
In file included from /usr/local/include/freeradius/radiusd.h:30,
                 from ../src/rlm_tokensms.cpp:18:
/usr/local/include/freeradius/libradius.h:160: error: expected
type-specifier before ‘;’ token
/usr/local/include/freeradius/libradius.h:338: error: expected ‘,’ or
‘...’ before ‘operator’
In file included from /usr/local/include/freeradius/radiusd.h:33,
                 from ../src/rlm_tokensms.cpp:18:
/usr/local/include/freeradius/conffile.h:94: error: expected ‘,’ or
‘...’ before ‘template’
In file included from ../src/rlm_tokensms.cpp:18:
/usr/local/include/freeradius/radiusd.h:243: error: declaration of
‘home_server* auth_req::home_server’
/usr/local/include/freeradius/realms.h:85: error: changes meaning of
‘home_server’ from ‘typedef struct home_server home_server’
/usr/local/include/freeradius/radiusd.h:577: error: expected ‘,’ or
‘...’ before ‘operator’

I am googling about the proper way of compilation values but the only
topics I have found, were from year 2002. 

I am not familiar with mixing C with C++ so I would like to ask You for
help. I do not want to rewrite my code for C, because it will be such a
loss of my work.


-- 
krzychk2 <krzychk2 at tlen.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cos.cpp
Type: text/x-c++src
Size: 1484 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20090720/21b1dfd8/attachment.cpp>


More information about the Freeradius-Devel mailing list