[Newbie] SIP parser and header-file including (using sofia-sip)
Hi all,
I am currently developing a small quick'n dirty SIP (Session Initiation Protocol) parser. Its task is to read a file (or command-line argument) with a SIP requst and parse it using the sofia-sip library. It should exit either with "1" on parsing failure or "0" on parsing success.
Re: [Newbie] SIP parser and header-file including (using sofia-sip)
Hm, thanks for your response, but the error stays the same:
Code:
marcel@hades:~/tools/sipparser$ g++ -o parser -I/usr/include/sofia-sip-1.12 parser.cpp -lsofia-sip
parser.cpp: In function ‘int main()’:
parser.cpp:9:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
parser.cpp:10:45: error: ‘sip_default_mclass’ was not declared in this scope
Re: [Newbie] SIP parser and header-file including (using sofia-sip)
Originally Posted by marcel_s
Hm, thanks for your response, but the error stays the same:
The error is not a linker error, it is a compiler error. Adding library binaries will not fix the problem that you're having, since libraries only come into play at the link (not compile) stage of building the application.
The error is simple -- the compiler is stating that it has no idea what a "sip_default_mclass" is. This indicates that the definition is either in a missing header file, or the definition has been "commented out" prior to you referring to it using #ifdef or some other preprocessor directive.
So your job is to find where "sip_default_mclass" is declared, and verify it is being #included and has not been preprocessed away.
Bookmarks