Error making libavetanaBT.so

Ilde M.
2007-01-04
2013-04-15
  • Ilde M.

    Ilde M. - 2007-01-04

    i get this error making libavetanaBT.so

    g++ -shared -lbluetooth -I /opt/jdk1.5.0_10/include -I /opt/jdk1.5.0_10/include/linux BlueZ.cpp -o /home/alfonso/avetanabt/binaries/libavetanaBT.so
    BlueZ.cpp:1957: error: expected ‘,’ or ‘...’ before ‘*’ token
    BlueZ.cpp:1957: error: ISO C++ forbids declaration of ‘sdp_cstate_t’ with no type
    BlueZ.cpp: In function ‘int copy_cstate(char*, int)’:
    BlueZ.cpp:1961: error: ‘cstate’ was not declared in this scope
    BlueZ.cpp: In function ‘_jobject* my_sdp_service_attr_req(JNIEnv*, _jclass*, sdp_session_t*, uint32_t, sdp_attrreq_type_t, const sdp_list_t*)’:
    BlueZ.cpp:1988: error: ‘sdp_cstate_t’ was not declared in this scope
    BlueZ.cpp:1988: error: ‘cstate’ was not declared in this scope
    BlueZ.cpp:2073: error: expected primary-expression before ‘)’ token
    BlueZ.cpp: In function ‘int my_sdp_service_search_attr_req(JNIEnv*, _jclass*, sdp_session_t*, const sdp_list_t*, sdp_attrreq_type_t, const sdp_list_t*, sdp_list_t**, sdp_list_t*, _jstring*, jint)’:
    BlueZ.cpp:2123: error: ‘sdp_cstate_t’ was not declared in this scope
    BlueZ.cpp:2123: error: ‘cstate’ was not declared in this scope
    BlueZ.cpp:2216: error: expected primary-expression before ‘)’ token

    i've
    g++ 4
    libbluetooth2
    bluez 3.7

    need a different library?

     
    • Ilde M.

      Ilde M. - 2007-01-05

      This error has been reported in a previous message (BlueZ 3.7 breaks AvetanaBT).

      Excuse me, i don´t have seen.

       
    • Abraham Mueller

      Abraham Mueller - 2007-01-26

      Hi

      I found a solution for the compilation problem at:

      http://www.gerdavax.it/mobile/avetana-bluetooth-jsr-82-on-linux-ubuntu-610/

      copy the following declaration in Bluez.cpp
      typedef struct {
          uint8_t length;
          unsigned char data[16];
      } __attribute__ ((packed)) sdp_cstate_t;

      after that install script works fine...

      fuerchti

       
    • Maulin

      Maulin - 2007-03-25

      Hello Guys,

      I'm having this exact same issue but i'm a little lost as to what i should be doing with the;

      copy the following declaration in Bluez.cpp
      typedef struct {
      uint8_t length;
      unsigned char data[16];
      } __attribute__ ((packed)) sdp_cstate_t;

      Where should i be placing this? I've tried placing it near the top of the bluez.cpp but it doesnt appear to work, i get a different error about c compilation.

      Thanks for any help you can give me, i'd like to know EXACTLY what i should be doing with that snippet, where should i be placing it?

      Thanks,

      Rob

       

Log in to post a comment.