maosuyun2009 writes

I want cross compile for my mini2440. I cross compiled all needd libs(libupnp,libcurl,libmpdclient,and so on). I executed ./configure ./configure --host=arm-linux --prefix=/opt/FriendlyARM/toolschain/4.4.3/ LDFLAGS="-L/opt/FriendlyARM/toolschain/4.4.3/lib/libmpdclient-2.8/ -L/opt/FriendlyARM/toolschain/4.4.3/lib" CPPFLAGS="-I/opt/FriendlyARM/toolschain/4.4.3/include/ -I/opt/FriendlyARM/toolschain/4.4.3/include/libmpdclient-2.8" LIBS="-lexpat -lcurl -lupnp -lixml -lthreadutil"

But some problem happend: checking for UPnPP::getLibUPnP in -lupnpp… no

After configured I try to run make to compile this project,But some error happend: src/execmd.cpp: In destructor ExecCmdRsrc::~ExecCmdRsrc(): src/execmd.cpp:225: error: no matching function for call to std::shared_ptr<Netcon >::shared_ptr(int) /opt/FriendlyARM/toolschain/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/include/c++/4.4.3/bits/shared_ptr.h:1263: note: candidates are: std::shared_ptr<_Tp >::shared_ptr(std::shared_ptr<_Tp >&&) [with _Tp = Netcon]

Please tell me, if i want to compile upmpdcli for my mini2440, how can i do

medoc92 writes

Please try with this patch (just remove the 0 on both shared_ptr lines).

diff --git a/src/execmd.cpp b/src/execmd.cpp
index 3230551..2b4afb7 100644
--- a/src/execmd.cpp
+++ b/src/execmd.cpp
@@ -222,8 +222,8 @@ public:
                         grp, errno));
             }
        }
-       m_parent- >m_tocmd = std::shared_ptr<Netcon >(0);
-       m_parent- >m_fromcmd = std::shared_ptr<Netcon >(0);
+       m_parent- >m_tocmd = std::shared_ptr<Netcon >();
+       m_parent- >m_fromcmd = std::shared_ptr<Netcon >();
        pthread_sigmask(SIG_UNBLOCK, &m_parent- >m_blkcld, 0);
        m_parent- >reset();
     }

maosuyun2009 writes

Thanks, this patch solved my problem;But I have another problem,Can i run upmpcli with mpd(version < 0.19 such as 0.16; Because my cross compiler version is 4.4.3 < 4.6, so can’t compile mpd-0.19 ro mpd-0.18)

medoc92 writes

Yes, you can certainly run upmpdcli with older mpd versions, as it only depends on the client protocol.

The only problem with this is that, when used with upmpdcli, mpd plays from files which it fetches through http. Older mpd releases had a variety of issues with this, all depending on file type. Typically this has worked for a long time with mp3, and less so with other formats, especially linear sound. So you should just give it a try !