【发布时间】:2020-09-17 00:57:02
【问题描述】:
我正在使用 msys2 编译 pjsip 2.10:
1)打开msys2控制台:C:\msys64\msys2_shell.cmd
2) 运行更新:
pacman -Sy
pacman --needed -S bash pacman pacman-mirrors msys2-runtime
pacman -Su
pacman -S perl
pacman -S mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
pacman -S base-devel
3) 重启 msys2 控制台
4) 导出 PATH="/c/msys64/mingw32/bin/:$PATH"
5) 配置:
./configure --prefix=$PWD/dist_mingw --disable-ffmpeg --enable-shared --disable-video --disable-speex-aec --disable-speex-aec --disable-g711-codec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-vpx --disable-opus --disable-libyuv --disable-libwebrtc
6) make CFLAGS+="-DPJ_WIN32=1 -DPJ_M_I386=1 -D_LIB -DWIN32 -DPJ_M_I386=1"
7) 但是错误:
output/pjlib-x86_64-pc-msys/log.o:log.c:(.text+0xcb): undefined reference to `pj_time_decode'
output/pjlib-x86_64-pc-msys/ssl_sock_ossl.o:ssl_sock_ossl.c:(.text+0x205): undefined reference to `pj_time_encode'
output/pjlib-x86_64-pc-msys/ssl_sock_dump.o:ssl_sock_dump.c:(.text+0x9c): undefined reference to `pj_time_decode'
output/pjlib-x86_64-pc-msys/ssl_sock_dump.o:ssl_sock_dump.c:(.text+0xb2): undefined reference to `pj_time_decode'
8) 正如我所见,pj_time_encode 在pjproject-2.10\pjlib\src\pj\os_time_win32.c 中,但该文件未编译。相反,文件os_time_unix.c 已编译。我认为这就是原因。那么如何编译文件os_time_win32.c 而不是os_time_unix.c。
我不擅长makefile,所以这对我来说很难定制构建。非常感谢!
【问题讨论】:
-
您可以询问 pjsip 维护者。如果他们支持 Windows 构建,他们应该能够提供帮助。
标签: makefile pjsip mingw32 msys2