当前位置: 首页 > 工具软件 > jrtplib > 使用案例 >

jrtplib linux编译,linux下jrtplib-3.9.1编译与安装.txt

叶华皓
2023-12-01

一、安装包准备

1、进入官网http://research.edm.uhasselt.be/~jori/page/index.php?n=CS.Jrtplib下载jrtplib-3.9.1.tar.gz包,路径为:http://research.edm.uhasselt.be/jori/jrtplib/jrtplib-3.9.1.tar.gz

注意: Download下边有一段话:

The library uses the JThread library to automatically poll for incoming data in the background, so you may want to install it too. Of course, if you'd rather not have it installed, the library will also work without JThread (but you'll have to poll for incoming data yourself). Note that this version requires at least JThread 1.3.0.

2、进入官网http://research.edm.uhasselt.be/~jori/page/index.php?n=CS.Jthread,下载jthread-1.3.1.tar.gz包,路径为:http://research.edm.uhasselt.be/jori/jthread/jthread-1.3.1.tar.bz2

3、下载cmake工具:http://www.cmake.org/files/v2.8/cmake-2.8.12.1-Linux-i386.sh

二、安装cmake

$ sudo ./cmake-2.8.12.1-Linux-i386.sh --prefix=/usr/local/

$ sudo vi /etc/profile 添加:

export PATH=$PATH:/usr/local/cmake-3.6.0-Linux-i386/bin/

三、编译安装jthread-1.3.1

$ tar zxvf jthread-1.3.1.tar.bz2

$ cd jthread-1.3.1

$ cmake .

提示:

-- The C compiler identification is GNU 4.1.2

-- The CXX compiler identification is GNU 4.1.2

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Looking for include file pthread.h

-- Looking for include file pthread.h - found

-- Looking for pthread_create

-- Looking for pthread_create - not found

-- Looking for pthread_create in pthreads

-- Looking for pthread_create in pthreads - not found

-- Looking for pthread_create in pthread

-- Looking for pthread_create in pthread - found

-- Found Threads: TRUE

-- Configuring done

-- Generating done

-- Build files have been written to: /home/caiwang213/workspace/28181/jthread-1.3.1

$ make

提示:

[ 25%] Building CXX object src/CMakeFiles/jthread-shared.dir/pthread/jmutex.cpp.o

[ 50%] Building CXX object src/CMakeFiles/jthread-shared.dir/pthread/jthread.cpp.o

Linking CXX shared library libjthread.so

[ 50%] Built target jthread-shared

[ 75%] Building CXX object src/CMakeFiles/jthread-static.dir/pthread/jmutex.cpp.o

[100%] Building CXX object src/CMakeFiles/jthread-static.dir/pthread/jthread.cpp.o

Linking CXX static library libjthread.a

$ sudo make install

提示:

[ 50%] Built target jthread-shared

[100%] Built target jthread-static

Install the project...

-- Install configuration: ""

-- Up-to-date: /usr/local/include/jthread/jmutex.h

-- Up-to-date: /usr/local/include/jthread/jthread.h

-- Up-to-date: /usr/local/include/jthread/jmutexautolock.h

-- Up-to-date: /usr/local/include/jthread/jthreadconfig.h

-- Installing: /usr/local/lib/libjthread.a

-- Installing: /usr/local/lib/libjthread.so.1.3.1

-- Up-to-date: /usr/local/lib/libjthread.so

-- Up-to-date: /usr/local/lib/cmake/JThread/JThreadConfig.cmake

-- Up-to-date: /usr/local/lib/pkgconfig/jthread.pc

四、编译jrtplib-3.9.1

# tar zxvf jrtplib-3.9.1.tar.gz

# cd jrtplib-3.9.1

# cmake .

提示:

-- The C compiler identification is GNU 4.1.2

-- The CXX compiler identification is GNU 4.1.2

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Could NOT find JThread (missing: JTHREAD_INCLUDE_DIRS JTHREAD_LIBRARIES)

-- Looking for C++ include sys/filio.h

-- Looking for C++ include sys/filio.h - not found

-- Looking for C++ include sys/sockio.h

-- Looking for C++ include sys/sockio.h - not found

-- Looking for C++ include ifaddrs.h

-- Looking for C++ include ifaddrs.h - found

-- Check if the system is big endian

-- Searching 16 bit integer

-- Looking for sys/types.h

-- Looking for sys/types.h - found

-- Looking for stdint.h

-- Looking for stdint.h - found

-- Looking for stddef.h

-- Looking for stddef.h - found

-- Check size of unsigned short

-- Check size of unsigned short - done

-- Using unsigned short

-- Check if the system is big endian - little endian

-- Compiling socklentest.cpp

-- Compiling socklentest.cpp failed - setting RTP_SOCKLENTYPE_UINT in rtpconfig.h

-- Compiling ipv4mcasttest.cpp

-- Compiling ipv4mcasttest.cpp worked - setting RTP_SUPPORT_IPV4MULTICAST in rtpconfig.h

-- Compiling salentest.cpp

-- Compiling salentest.cpp failed - no action necessary

-- Compiling getloginrtest.cpp

-- Compiling getloginrtest.cpp worked - setting RTP_SUPPORT_GETLOGINR in rtpconfig.h

-- Compiling ipv6test.cpp

-- Compiling ipv6test.cpp worked - setting RTP_SUPPORT_IPV6 in rtpconfig.h

-- Compiling ipv6mcasttest.cpp

-- Compiling ipv6mcasttest.cpp worked - setting RTP_SUPPORT_IPV6MULTICAST in rtpconfig.h

-- Performing Test JRTPLIB_STDINT

-- Performing Test JRTPLIB_STDINT - Success

-- Configuring done

-- Generating done

-- Build files have been written to: /home/caiwang213/workspace/28181/jrtplib-3.9.1

$ cmake .

-- The C compiler identification is GNU 4.1.2

-- The CXX compiler identification is GNU 4.1.2

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Found JThread: /usr/local/include (如果没有安装jthread这一行会是:-- Could NOT find JThread (missing: JTHREAD_INCLUDE_DIRS JTHREAD_LIBRARIES) )

-- Looking for C++ include sys/filio.h

-- Looking for C++ include sys/filio.h - not found

-- Looking for C++ include sys/sockio.h

-- Looking for C++ include sys/sockio.h - not found

-- Looking for C++ include ifaddrs.h

-- Looking for C++ include ifaddrs.h - found

-- Check if the system is big endian

-- Searching 16 bit integer

-- Looking for sys/types.h

-- Looking for sys/types.h - found

-- Looking for stdint.h

-- Looking for stdint.h - found

-- Looking for stddef.h

-- Looking for stddef.h - found

-- Check size of unsigned short

-- Check size of unsigned short - done

-- Using unsigned short

-- Check if the system is big endian - little endian

-- Compiling socklentest.cpp

-- Compiling socklentest.cpp failed - setting RTP_SOCKLENTYPE_UINT in rtpconfig.h

-- Compiling ipv4mcasttest.cpp

-- Compiling ipv4mcasttest.cpp worked - setting RTP_SUPPORT_IPV4MULTICAST in rtpconfig.h

-- Compiling salentest.cpp

-- Compiling salentest.cpp failed - no action necessary

-- Compiling getloginrtest.cpp

-- Compiling getloginrtest.cpp worked - setting RTP_SUPPORT_GETLOGINR in rtpconfig.h

-- Compiling ipv6test.cpp

-- Compiling ipv6test.cpp worked - setting RTP_SUPPORT_IPV6 in rtpconfig.h

-- Compiling ipv6mcasttest.cpp

-- Compiling ipv6mcasttest.cpp worked - setting RTP_SUPPORT_IPV6MULTICAST in rtpconfig.h

-- Performing Test JRTPLIB_STDINT

-- Performing Test JRTPLIB_STDINT - Success

-- Configuring done

-- Generating done

-- Build files have been written to: /home/caiwang213/workspace/28181/jrtplib-3.9.1

$ make

提示:

Scanning dependencies of target jrtplib-shared

[ 1%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpapppacket.cpp.o

[ 2%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpbyepacket.cpp.o

[ 3%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpcompoundpacket.cpp.o

[ 5%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpcompoundpacketbuilder.cpp.o

[ 6%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcppacket.cpp.o

[ 7%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcppacketbuilder.cpp.o

[ 9%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcprrpacket.cpp.o

[ 10%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpscheduler.cpp.o

[ 11%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpsdesinfo.cpp.o

[ 12%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpsdespacket.cpp.o

[ 14%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpsrpacket.cpp.o

[ 15%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpcollisionlist.cpp.o

[ 16%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpdebug.cpp.o

[ 18%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtperrors.cpp.o

[ 19%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpinternalsourcedata.cpp.o

[ 20%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpipv4address.cpp.o

[ 22%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpipv6address.cpp.o

[ 23%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtplibraryversion.cpp.o

[ 24%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtppacket.cpp.o

[ 25%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtppacketbuilder.cpp.o

[ 27%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtppollthread.cpp.o

[ 28%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtprandom.cpp.o

[ 29%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtprandomrand48.cpp.o

[ 31%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtprandomrands.cpp.o

[ 32%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtprandomurandom.cpp.o

[ 33%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsession.cpp.o

[ 35%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsessionparams.cpp.o

[ 36%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsessionsources.cpp.o

[ 37%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsourcedata.cpp.o

[ 38%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsources.cpp.o

[ 40%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtptimeutilities.cpp.o

[ 41%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpudpv4transmitter.cpp.o

[ 42%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpudpv6transmitter.cpp.o

[ 44%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpbyteaddress.cpp.o

[ 45%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpexternaltransmitter.cpp.o

[ 46%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/extratransmitters/rtpfaketransmitter.cpp.o

Linking CXX shared library libjrtp.so

[ 46%] Built target jrtplib-shared

Scanning dependencies of target jrtplib-static

[ 48%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpapppacket.cpp.o

[ 49%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpbyepacket.cpp.o

[ 50%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpcompoundpacket.cpp.o

[ 51%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpcompoundpacketbuilder.cpp.o

[ 53%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcppacket.cpp.o

[ 54%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcppacketbuilder.cpp.o

[ 55%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcprrpacket.cpp.o

[ 57%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpscheduler.cpp.o

[ 58%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpsdesinfo.cpp.o

[ 59%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpsdespacket.cpp.o

[ 61%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpsrpacket.cpp.o

[ 62%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpcollisionlist.cpp.o

[ 63%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpdebug.cpp.o

[ 64%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtperrors.cpp.o

[ 66%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpinternalsourcedata.cpp.o

[ 67%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpipv4address.cpp.o

[ 68%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpipv6address.cpp.o

[ 70%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtplibraryversion.cpp.o

[ 71%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtppacket.cpp.o

[ 72%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtppacketbuilder.cpp.o

[ 74%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtppollthread.cpp.o

[ 75%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtprandom.cpp.o

[ 76%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtprandomrand48.cpp.o

[ 77%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtprandomrands.cpp.o

[ 79%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtprandomurandom.cpp.o

[ 80%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsession.cpp.o

[ 81%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsessionparams.cpp.o

[ 83%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsessionsources.cpp.o

[ 84%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsourcedata.cpp.o

[ 85%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsources.cpp.o

[ 87%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtptimeutilities.cpp.o

[ 88%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpudpv4transmitter.cpp.o

[ 89%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpudpv6transmitter.cpp.o

[ 90%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpbyteaddress.cpp.o

[ 92%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpexternaltransmitter.cpp.o

[ 93%] Building CXX object src/CMakeFiles/jrtplib-static.dir/extratransmitters/rtpfaketransmitter.cpp.o

Linking CXX static library libjrtp.a

[ 93%] Built target jrtplib-static

Scanning dependencies of target example1

[ 94%] Building CXX object examples/CMakeFiles/example1.dir/example1.cpp.o

Linking CXX executable example1

[ 94%] Built target example1

Scanning dependencies of target example2

[ 96%] Building CXX object examples/CMakeFiles/example2.dir/example2.cpp.o

Linking CXX executable example2

[ 96%] Built target example2

Scanning dependencies of target example3

[ 97%] Building CXX object examples/CMakeFiles/example3.dir/example3.cpp.o

Linking CXX executable example3

[ 97%] Built target example3

Scanning dependencies of target example4

[ 98%] Building CXX object examples/CMakeFiles/example4.dir/example4.cpp.o

Linking CXX executable example4

[ 98%] Built target example4

Scanning dependencies of target example5

[100%] Building CXX object examples/CMakeFiles/example5.dir/example5.cpp.o

Linking CXX executable example5

[100%] Built target example5

$ sudo make install

提示:

[ 46%] Built target jrtplib-shared

[ 93%] Built target jrtplib-static

[ 94%] Built target example1

[ 96%] Built target example2

[ 97%] Built target example3

[ 98%] Built target example4

[100%] Built target example5

Install the project...

-- Install configuration: ""

-- Installing: /usr/local/lib/cmake/JRTPLIB/JRTPLIBConfig.cmake

-- Installing: /usr/local/lib/pkgconfig/jrtplib.pc

-- Installing: /usr/local/include/jrtplib3/rtcpapppacket.h

-- Installing: /usr/local/include/jrtplib3/rtcpbyepacket.h

-- Installing: /usr/local/include/jrtplib3/rtcpcompoundpacket.h

-- Installing: /usr/local/include/jrtplib3/rtcpcompoundpacketbuilder.h

-- Installing: /usr/local/include/jrtplib3/rtcppacket.h

-- Installing: /usr/local/include/jrtplib3/rtcppacketbuilder.h

-- Installing: /usr/local/include/jrtplib3/rtcprrpacket.h

-- Installing: /usr/local/include/jrtplib3/rtcpscheduler.h

-- Installing: /usr/local/include/jrtplib3/rtcpsdesinfo.h

-- Installing: /usr/local/include/jrtplib3/rtcpsdespacket.h

-- Installing: /usr/local/include/jrtplib3/rtcpsrpacket.h

-- Installing: /usr/local/include/jrtplib3/rtcpunknownpacket.h

-- Installing: /usr/local/include/jrtplib3/rtpaddress.h

-- Installing: /usr/local/include/jrtplib3/rtpcollisionlist.h

-- Installing: /usr/local/include/jrtplib3/rtpconfig.h

-- Installing: /usr/local/include/jrtplib3/rtpdebug.h

-- Installing: /usr/local/include/jrtplib3/rtpdefines.h

-- Installing: /usr/local/include/jrtplib3/rtperrors.h

-- Installing: /usr/local/include/jrtplib3/rtphashtable.h

-- Installing: /usr/local/include/jrtplib3/rtpinternalsourcedata.h

-- Installing: /usr/local/include/jrtplib3/rtpipv4address.h

-- Installing: /usr/local/include/jrtplib3/rtpipv4destination.h

-- Installing: /usr/local/include/jrtplib3/rtpipv6address.h

-- Installing: /usr/local/include/jrtplib3/rtpipv6destination.h

-- Installing: /usr/local/include/jrtplib3/rtpkeyhashtable.h

-- Installing: /usr/local/include/jrtplib3/rtplibraryversion.h

-- Installing: /usr/local/include/jrtplib3/rtpmemorymanager.h

-- Installing: /usr/local/include/jrtplib3/rtpmemoryobject.h

-- Installing: /usr/local/include/jrtplib3/rtppacket.h

-- Installing: /usr/local/include/jrtplib3/rtppacketbuilder.h

-- Installing: /usr/local/include/jrtplib3/rtppollthread.h

-- Installing: /usr/local/include/jrtplib3/rtprandom.h

-- Installing: /usr/local/include/jrtplib3/rtprandomrand48.h

-- Installing: /usr/local/include/jrtplib3/rtprandomrands.h

-- Installing: /usr/local/include/jrtplib3/rtprandomurandom.h

-- Installing: /usr/local/include/jrtplib3/rtprawpacket.h

-- Installing: /usr/local/include/jrtplib3/rtpsession.h

-- Installing: /usr/local/include/jrtplib3/rtpsessionparams.h

-- Installing: /usr/local/include/jrtplib3/rtpsessionsources.h

-- Installing: /usr/local/include/jrtplib3/rtpsourcedata.h

-- Installing: /usr/local/include/jrtplib3/rtpsources.h

-- Installing: /usr/local/include/jrtplib3/rtpstructs.h

-- Installing: /usr/local/include/jrtplib3/rtptimeutilities.h

-- Installing: /usr/local/include/jrtplib3/rtptransmitter.h

-- Installing: /usr/local/include/jrtplib3/rtptypes_win.h

-- Installing: /usr/local/include/jrtplib3/rtptypes.h

-- Installing: /usr/local/include/jrtplib3/rtpudpv4transmitter.h

-- Installing: /usr/local/include/jrtplib3/rtpudpv6transmitter.h

-- Installing: /usr/local/include/jrtplib3/rtpbyteaddress.h

-- Installing: /usr/local/include/jrtplib3/rtpexternaltransmitter.h

-- Installing: /usr/local/include/jrtplib3/rtpfaketransmitter.h

-- Installing: /usr/local/lib/libjrtp.a

-- Installing: /usr/local/lib/libjrtp.so.3.9.1

-- Installing: /usr/local/lib/libjrtp.so

-- Removed runtime path from "/usr/local/lib/libjrtp.so.3.9.1"

一键复制

编辑

Web IDE

原始数据

按行查看

历史

 类似资料: