../thelib/libthelib.so: undefined reference to `dlopen'

在Ubuntu下编译Crtmpserver出现如下错误

../thelib/libthelib.so: undefined reference to `dlopen'
../thelib/libthelib.so: undefined reference to `dlclose'
../thelib/libthelib.so: undefined reference to `dlerror'
../thelib/libthelib.so: undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[2]: *** [rtmpserver/rtmpserver] Error 1
make[1]: *** [rtmpserver/CMakeFiles/rtmpserver.dir/all] Error 2

解决办法:打开builders/cmake下的CMakeCache.txt,修改DL_LIBRARY_PATH为DL_LIBRARY_PATH:FILEPATH=/lib/x86_64-linux-gnu/libdl.so.2

/home/user/crtmpserver/3rdparty/tinyxml/tinyxmlparser.cpp: In static member function 'static const char* TiXmlBase::GetEntity(const char*, char*, int*, TiXmlEncoding)':
/home/user/crtmpserver/3rdparty/tinyxml/tinyxmlparser.cpp:407:9: error: 'ptrdiff_t' was not declared in this scope
/home/user/crtmpserver/3rdparty/tinyxml/tinyxmlparser.cpp:407:9: note: suggested alternatives:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:156:28: note:   'std::ptrdiff_t'
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:156:28: note:   'std::ptrdiff_t'
/home/user/crtmpserver/3rdparty/tinyxml/tinyxmlparser.cpp:407:19: error: expected ';' before 'delta'
/home/user/crtmpserver/3rdparty/tinyxml/tinyxmlparser.cpp:419:13: error: 'delta' was not declared in this scope
/home/user/crtmpserver/3rdparty/tinyxml/tinyxmlparser.cpp:443:13: error: 'delta' was not declared in this scope
/home/user/crtmpserver/3rdparty/tinyxml/tinyxmlparser.cpp:462:20: error: 'delta' was not declared in this scope
make[2]: *** [tinyxml/CMakeFiles/tinyxml.dir/home/user/crtmpserver/3rdparty/tinyxml/tinyxmlparser.cpp.o] Error 1
make[1]: *** [tinyxml/CMakeFiles/tinyxml.dir/all] Error 2
make: *** [all] Error 2

解决办法:

tinyxml.h 增加using namespace std;


你可能感兴趣的:(crtmpserver)