PDA

View Full Version : [ubuntu] 12.04 failed to compile of HFP bluetooth Hands-Free Profile



s-sven
December 23rd, 2013, 01:36 PM
Hi!

I have been trying to compile the HFP sourcecode and install on Ubuntu 12.04. When I am trying to compile i get this message, and I dont know where to start looking for a solution from here to be honest.

g++ -DHAVE_CONFIG_H -I. -I.. -I../include -include config.h -Wshadow -fno-exceptions -g -Wall -MT bt.o -MD -MP -MF .deps/bt.Tpo -c -o bt.o bt.cpp
In file included from bt.cpp:48:0:
../include/libhfp/bt.h: In member function ‘void libhfp::BtDevice::DisconnectAll()’:
../include/libhfp/bt.h:1081:50: warning: converting ‘false’ to pointer type for argument 1 of ‘void libhfp::BtDevice::__DisconnectAll(libhfp::ErrorInf o*)’ [-Wconversion-null]
bt.cpp: In static member function ‘static int libhfp::SdpAsyncTaskHandler::SdpLookupChannel(libh fp::SdpTaskParams&)’:
bt.cpp:81:20: error: taking address of temporary [-fpermissive]
bt.cpp: In member function ‘bool libhfp::BtHub::Start(libhfp::ErrorInfo*)’:
bt.cpp:1226:22: error: taking address of temporary [-fpermissive]
bt.cpp:1226:34: error: taking address of temporary [-fpermissive]
make[1]: *** [bt.o] Error 1
make[1]: Leaving directory `/home/svegus/Downloads/hfp/trunk/libhfp'
make: *** [install-recursive] Error 1


Any suggestions much appreciated.

Regards,

Sven

TheFu
December 23rd, 2013, 02:42 PM
I don't have any idea about hte specific code, but the error is right in your post.

include/libhfp/bt.h:1081:50: warning: converting ‘false’ to pointer type for argument 1 of ‘void libhfp::BtDevice::__DisconnectAll(libhfp::ErrorInf o*)’ [-Wconversion-null]

So, the code is checking for a return and the function returns "void" ... er .... nothing. If you aren't a C/C++ dev, I think you'll need detailed help on-your-system to fix it.

Again, since I know nothing about this code, I would assume that it does compile with ZERO warnings on the developer's system, so that would lead me to beleive that your system isn't using exactly the same libraries, headers as the developer uses. I'd start there.