Ok, makes sense. However, the problem is somewhere else then, since I cannot not link the function pjmedia_type_name(). I would say that in pjmedia/include/pjmedia/types.h the PJ_BEGIN_DECL and PJ_END_DECL are missing? BR Georg -----Original Message----- From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of Walter Doekes Sent: Monday, September 19, 2016 09:02 To: pjsip list <pjsip@xxxxxxxxxxxxxxx> Subject: Re: Linking C-API functions, when using pjsua2 On 18-09-16 13:54, Piewald Georg wrote: > So I guess that's a bug? The fix would be simple: > > extern "C" { > #include <pjsua-lib/pjsua.h> > } That construct looks odd. Generally I'd expect the .h header to include the extern part not the caller of the include. See any header in /usr/include (nowadays perhaps using a __BEGIN_DECLS macro). And that's what I find inside a sample pjsip/sip_auth.h on my system: It starts with PJ_BEGIN_DECL, and that in turn is defined as: /** * @def PJ_END_DECL * Mark end of declaration section in a header file. */ #ifdef __cplusplus # define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN # define PJ_IDECL_NO_RETURN(type) PJ_INLINE(type) PJ_NORETURN # define PJ_BEGIN_DECL extern "C" { # define PJ_END_DECL } #else # define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type) # define PJ_IDECL_NO_RETURN(type) PJ_NORETURN PJ_INLINE(type) # define PJ_BEGIN_DECL # define PJ_END_DECL #endif Greetings, Walter _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org