fairwaves / UHD-Fairwaves

Fairwaves version of the UHD drivers, tweaked to support Fairwaves UmTRX.
http://umtrx.org
24 stars 21 forks source link

Compilation error : power_amp.cpp:210:40: error: no matching function for call to ‘std::__cxx11::list<std::__cxx11::basic_string<char> >::push_back(std::string* const&)’ #26

Open clebig opened 3 years ago

clebig commented 3 years ago

Hi, I'm trying to compile the master branch on a debian testing x86_64 , but it fails with the following error.

In file included from /tmp/UHD-Fairwaves/host/power_amp.cpp:1:
/tmp/UHD-Fairwaves/host/power_amp.hpp:67:21: error: field ‘name’ has incomplete type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
   67 |         std::string name;
      |                     ^~~~
In file included from /usr/include/c++/10/iosfwd:39,
                 from /usr/include/c++/10/memory:74,
                 from /usr/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /root/UHD-Fairwaves/host/power_amp.hpp:7,
                 from /root/UHD-Fairwaves/host/power_amp.cpp:1:

GCC version : 10.2.0-19 libstdc++.so.6.0.28

I could fix it with std::string const &name at name declaration in power_amp.hpp

protected:

    // Map PA types to string names
    struct pa_type_map_pair_t {
        pa_type_t type;
        std::string const &name;
    };
    static const pa_type_map_pair_t _pa_type_map[];

};

But honestly, I don't know if it's correct.

dsseng commented 9 months ago

Likely fixed now in master after PR 30