none
How to build pjsip as DLL by vs2008 RRS feed

答案

全部回复

  • https://sites.google.com/site/sipekvoip/Home/documentation/pjsipwrapper/pjsipwrapper-for-windows

    How to build pjsipDll project?

    The pjsipdll project (pjsipDll.vcproj) should be part of pjsip solution (pjproject.sln). Follow the steps below:

    The compilation result is a dynamic library pjsipDll.dll placed in [pjsipDll folder]/lib folder.

    歡迎參觀我的Blog【菜鳥自救會】

    2013年6月3日 0:48
  • 求助,我最近也在看PJSIP,我用的是PJ2.x,编译用的是VS2012。不添加pjsipdll 项目时,按着官方的过程可以编译通过,但是按上面的步骤添加后报错:

    17>..\src\pjsipDll.cpp(1119): error C3861: “pjsua_media_transports_create”: 找不到标识符
    17>..\src\pjsipDll.cpp(1591): warning C4018: “>=”: 有符号/无符号不匹配
    17>..\src\pjsipDll.cpp(1629): error C2065: “pjmedia_session_info”: 未声明的标识符
    17>..\src\pjsipDll.cpp(1629): error C2146: 语法错误: 缺少“;”(在标识符“media_info”的前面)
    17>..\src\pjsipDll.cpp(1629): error C2065: “media_info”: 未声明的标识符
    17>..\src\pjsipDll.cpp(1632): error C2039: “session”: 不是“pjsua_call”的成员
    17>          E:\pjproject-2.2\pjsip\include\pjsua-lib/pjsua_internal.h(121) : 参见“pjsua_call”的声明
    17>..\src\pjsipDll.cpp(1635): error C2039: “session”: 不是“pjsua_call”的成员
    17>          E:\pjproject-2.2\pjsip\include\pjsua-lib/pjsua_internal.h(121) : 参见“pjsua_call”的声明
    17>..\src\pjsipDll.cpp(1635): error C2065: “media_info”: 未声明的标识符
    17>..\src\pjsipDll.cpp(1635): error C3861: “pjmedia_session_get_info”: 找不到标识符
    17>..\src\pjsipDll.cpp(1637): error C2065: “media_info”: 未声明的标识符
    17>..\src\pjsipDll.cpp(1637): error C2228: “.stream_cnt”的左边必须有类/结构/联合
    17>          类型是“'unknown-type'”
    17>..\src\pjsipDll.cpp(1640): error C2065: “media_info”: 未声明的标识符
    17>..\src\pjsipDll.cpp(1640): error C2228: “.stream_info”的左边必须有类/结构/联合
    17>          类型是“'unknown-type'”
    17>..\src\pjsipDll.cpp(1640): error C2228: “.fmt”的左边必须有类/结构/联合
    17>..\src\pjsipDll.cpp(1640): error C2228: “.encoding_name”的左边必须有类/结构/联合
    17>..\src\pjsipDll.cpp(1640): error C2228: “.ptr”的左边必须有类/结构/联合
    17>..\src\pjsipDll.cpp(1640): error C2228: “.slen”的左边必须有类/结构/联合
    17>..\src\pjsipDll.cpp(1641): error C2065: “media_info”: 未声明的标识符
    17>..\src\pjsipDll.cpp(1641): error C2228: “.stream_info”的左边必须有类/结构/联合
    17>          类型是“'unknown-type'”
    17>..\src\pjsipDll.cpp(1641): error C2228: “.fmt”的左边必须有类/结构/联合
    17>..\src\pjsipDll.cpp(1641): error C2228: “.encoding_name”的左边必须有类/结构/联合
    17>..\src\pjsipDll.cpp(1641): error C2228: “.slen”的左边必须有类/结构/联合

    查看 \pjsip\include\pjsua-lib\pjsua.h文件后发现PJ项目中默认把宏DISABLED_FOR_TICKET_1185定义为0,所以编译后没有pjsua_media_transports_create。

    然后我将其修改为 1后,又编译不通过:

    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3655): error C2275: “pjsua_call”: 将此类型用作表达式非法
    3>          e:\pjproject-2.2\pjsip\include\pjsua-lib\pjsua_internal.h(31) : 参见“pjsua_call”的声明
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3655): error C2065: “call”: 未声明的标识符
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3658): error C2065: “call”: 未声明的标识符
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3658): warning C4047: “=”:“int”与“pjsua_call *”的间接级别不同
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3660): error C2065: “call”: 未声明的标识符
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3660): error C2223: “->tp”的左侧必须指向结构/联合
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3667): error C2065: “call”: 未声明的标识符
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3667): error C2223: “->med_tp”的左侧必须指向结构/联合
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3667): warning C4133: “函数”: 从“pjmedia_transport_info *”到“pjmedia_transport *”的类型不兼容
    3>e:\pjproject-2.2\pjsip\src\pjsua-lib\pjsua_call.c(3667): error C2198: “pjmedia_transport_get_info”: 用于调用的参数太少


    谢谢!


    2014年3月11日 4:01