AlwinEsch / pvr.rtl.radiofm

FM Radio receiver based upon RTL-SDR as pvr addon for KODI
GNU General Public License v2.0
38 stars 15 forks source link

Compile Error @ %22 #4

Open MrBricker opened 6 years ago

MrBricker commented 6 years ago
osmc@osmc:~/pvr.rtl.radiofm/build$ sudo make install
[ 17%] Built target rtlsdr_static
[ 20%] Building CXX object CMakeFiles/pvr.rtl.radiofm.dir/src/RadioReceiver.cpp.o
/home/osmc/pvr.rtl.radiofm/src/RadioReceiver.cpp: In member function 'bool cRadioReceiver::LoadChannelData(bool)':
/home/osmc/pvr.rtl.radiofm/src/RadioReceiver.cpp:707:60: error: invalid initialization of non-const reference of type 'CStdString& {aka CStdStr<char>&}' from an rvalue of type 'CStdString {aka CStdStr<char>}'
       if (!XMLUtils::GetString(pChannelNode, "name", strTmp))
                                                            ^
In file included from /usr/include/kodi/util/XMLUtils.h:24:0,
                 from /home/osmc/pvr.rtl.radiofm/src/client.h:29,
                 from /home/osmc/pvr.rtl.radiofm/src/RadioReceiver.h:24,
                 from /home/osmc/pvr.rtl.radiofm/src/RadioReceiver.cpp:25:
/usr/include/p8-platform/util/StdString.h:2078:3: note:   after user-defined conversion: CStdStr<CT>::CStdStr(const string&) [with CT = char; std::__cxx11::string = std::__cxx11::basic_string<char>]
   CStdStr(const std::string& str)
   ^~~~~~~
In file included from /home/osmc/pvr.rtl.radiofm/src/client.h:29:0,
                 from /home/osmc/pvr.rtl.radiofm/src/RadioReceiver.h:24,
                 from /home/osmc/pvr.rtl.radiofm/src/RadioReceiver.cpp:25:
/usr/include/kodi/util/XMLUtils.h:40:15: note:   initializing argument 3 of 'static bool XMLUtils::GetString(const TiXmlNode*, const char*, CStdString&)'
   static bool GetString(const TiXmlNode* pRootNode, const char* strTag, CStdString& strStringValue);
               ^~~~~~~~~
/home/osmc/pvr.rtl.radiofm/src/RadioReceiver.cpp:713:60: error: invalid initialization of non-const reference of type 'CStdString& {aka CStdStr<char>&}' from an rvalue of type 'CStdString {aka CStdStr<char>}'
       if (!XMLUtils::GetString(pChannelNode, "icon", strTmp))
                                                            ^
In file included from /usr/include/kodi/util/XMLUtils.h:24:0,
                 from /home/osmc/pvr.rtl.radiofm/src/client.h:29,
                 from /home/osmc/pvr.rtl.radiofm/src/RadioReceiver.h:24,
                 from /home/osmc/pvr.rtl.radiofm/src/RadioReceiver.cpp:25:
/usr/include/p8-platform/util/StdString.h:2078:3: note:   after user-defined conversion: CStdStr<CT>::CStdStr(const string&) [with CT = char; std::__cxx11::string = std::__cxx11::basic_string<char>]
   CStdStr(const std::string& str)
   ^~~~~~~
In file included from /home/osmc/pvr.rtl.radiofm/src/client.h:29:0,
                 from /home/osmc/pvr.rtl.radiofm/src/RadioReceiver.h:24,
                 from /home/osmc/pvr.rtl.radiofm/src/RadioReceiver.cpp:25:
/usr/include/kodi/util/XMLUtils.h:40:15: note:   initializing argument 3 of 'static bool XMLUtils::GetString(const TiXmlNode*, const char*, CStdString&)'
   static bool GetString(const TiXmlNode* pRootNode, const char* strTag, CStdString& strStringValue);
               ^~~~~~~~~
CMakeFiles/pvr.rtl.radiofm.dir/build.make:86: recipe for target 'CMakeFiles/pvr.rtl.radiofm.dir/src/RadioReceiver.cpp.o' failed
make[2]: *** [CMakeFiles/pvr.rtl.radiofm.dir/src/RadioReceiver.cpp.o] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/pvr.rtl.radiofm.dir/all' failed
make[1]: *** [CMakeFiles/pvr.rtl.radiofm.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
shanemeagher commented 6 years ago

@MrBricker, have you found a solution to this?

/home/osmc/pvr.rtl.radiofm/src/RadioReceiver.cpp:707:60: error: invalid initialization of non-const reference of type 'CStdString& {aka CStdStr<char>&}' from an rvalue of type 'CStdString {aka CStdStr<char>}'
       if (!XMLUtils::GetString(pChannelNode, "name", strTmp))
                                                            ^

I am running into the same issue when compiling for LibreELEC 8.2.5 (both x86_64 and Raspberry Pi 3 builds) using a host running Linux Mint 18.3 (Ubuntu 16:04 x86_64).