* [Bluez-users] error to compile avetana
@ 2007-12-18 8:55 russogia4
2007-12-18 13:33 ` Manuel Naranjo
0 siblings, 1 reply; 2+ messages in thread
From: russogia4 @ 2007-12-18 8:55 UTC (permalink / raw)
To: bluez-users
Hi, i tried to compile avetanaBT-20070719.tgz but it return me the follow =
error:
g++ -shared -lbluetooth -I /opt/jdk1.6.0_03/include -I /opt/jdk1.6.0_03/inc=
lude//opt/jdk1.6.0_03/include BlueZ.cpp -o /home/gianfranco/Desktop/Cartell=
a/binaries/libavetanaBT.so =
BlueZ.cpp: In function =91int gen_dataseq_pdu(char*, const sdp_list_t*, uin=
t8_t)=92:
BlueZ.cpp:198: error: invalid conversion from =91uint8_t*=92 to =91char*=92
BlueZ.cpp: In function =91jint Java_de_avetana_bluetooth_stack_BlueZ_getLin=
kQuality(JNIEnv*, _jclass*, _jstring*)=92:
BlueZ.cpp:407: error: =91read_link_quality_rp=92 was not declared in this s=
cope
BlueZ.cpp:407: error: expected `;' before =91rp=92
BlueZ.cpp:456: error: =91OCF_READ_LINK_QUALITY=92 was not declared in this =
scope
BlueZ.cpp:459: error: =91rp=92 was not declared in this scope
BlueZ.cpp:460: error: =91READ_LINK_QUALITY_RP_SIZE=92 was not declared in t=
his scope
BlueZ.cpp: In function =91jint Java_de_avetana_bluetooth_stack_BlueZ_update=
Service(JNIEnv*, _jclass*, _jobject*, jlong)=92:
BlueZ.cpp:1203: error: =91sdp_gen_tid=92 was not declared in this scope
BlueZ.cpp: In function =91jint Java_de_avetana_bluetooth_stack_BlueZ_create=
Service(JNIEnv*, _jclass*, _jobject*)=92:
BlueZ.cpp:1385: error: =91sdp_gen_tid=92 was not declared in this scope
BlueZ.cpp: In function =91_jobject* my_sdp_service_attr_req(JNIEnv*, _jclas=
s*, sdp_session_t*, uint32_t, sdp_attrreq_type_t, const sdp_list_t*)=92:
BlueZ.cpp:2139: error: =91sdp_gen_tid=92 was not declared in this scope
BlueZ.cpp:2170: error: invalid conversion from =91uint8_t*=92 to =91char*=
=92
BlueZ.cpp: In function =91int my_sdp_service_search_attr_req(JNIEnv*, _jcla=
ss*, sdp_session_t*, const sdp_list_t*, sdp_attrreq_type_t, const sdp_list_=
t*, sdp_list_t**, sdp_list_t*, _jstring*, jint)=92:
BlueZ.cpp:2275: error: =91sdp_gen_tid=92 was not declared in this scope
BlueZ.cpp:2313: error: invalid conversion from =91uint8_t*=92 to =91char*=
=92
make[1]: *** [libavetanaBT.so] Error 1
make[1]: Leaving directory `/home/gianfranco/Desktop/Cartella/c'
make: *** [csource] Error 2
Can you help me?
Thanks
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bluez-users] error to compile avetana
2007-12-18 8:55 [Bluez-users] error to compile avetana russogia4
@ 2007-12-18 13:33 ` Manuel Naranjo
0 siblings, 0 replies; 2+ messages in thread
From: Manuel Naranjo @ 2007-12-18 13:33 UTC (permalink / raw)
To: russogia4; +Cc: BlueZ users
[-- Attachment #1: Type: text/plain, Size: 3032 bytes --]
Hi,
I've been able to compile avetana without much problem, only that I
needed to patch it a bit in order to be able to compile it in my 64 bits
system.
I'm mailing you my patch.
Maybe you are missing something, make sure you make all the exports that
are required for building:
JDK_HOME
JDK_PLATFORM
BIN_DIR
JDK_PLATFORM should be just linux.
Then launch install.
Thanks,
Manuel
> Hi, i tried to compile avetanaBT-20070719.tgz but it return me the follow error:
>
> g++ -shared -lbluetooth -I /opt/jdk1.6.0_03/include -I /opt/jdk1.6.0_03/include//opt/jdk1.6.0_03/include BlueZ.cpp -o /home/gianfranco/Desktop/Cartella/binaries/libavetanaBT.so
> BlueZ.cpp: In function ‘int gen_dataseq_pdu(char*, const sdp_list_t*, uint8_t)’:
> BlueZ.cpp:198: error: invalid conversion from ‘uint8_t*’ to ‘char*’
> BlueZ.cpp: In function ‘jint Java_de_avetana_bluetooth_stack_BlueZ_getLinkQuality(JNIEnv*, _jclass*, _jstring*)’:
> BlueZ.cpp:407: error: ‘read_link_quality_rp’ was not declared in this scope
> BlueZ.cpp:407: error: expected `;' before ‘rp’
> BlueZ.cpp:456: error: ‘OCF_READ_LINK_QUALITY’ was not declared in this scope
> BlueZ.cpp:459: error: ‘rp’ was not declared in this scope
> BlueZ.cpp:460: error: ‘READ_LINK_QUALITY_RP_SIZE’ was not declared in this scope
> BlueZ.cpp: In function ‘jint Java_de_avetana_bluetooth_stack_BlueZ_updateService(JNIEnv*, _jclass*, _jobject*, jlong)’:
> BlueZ.cpp:1203: error: ‘sdp_gen_tid’ was not declared in this scope
> BlueZ.cpp: In function ‘jint Java_de_avetana_bluetooth_stack_BlueZ_createService(JNIEnv*, _jclass*, _jobject*)’:
> BlueZ.cpp:1385: error: ‘sdp_gen_tid’ 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:2139: error: ‘sdp_gen_tid’ was not declared in this scope
> BlueZ.cpp:2170: error: invalid conversion from ‘uint8_t*’ to ‘char*’
> 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:2275: error: ‘sdp_gen_tid’ was not declared in this scope
> BlueZ.cpp:2313: error: invalid conversion from ‘uint8_t*’ to ‘char*’
> make[1]: *** [libavetanaBT.so] Error 1
> make[1]: Leaving directory `/home/gianfranco/Desktop/Cartella/c'
> make: *** [csource] Error 2
>
> Can you help me?
>
> Thanks
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>
[-- Attachment #2: avetana.patch --]
[-- Type: text/x-patch, Size: 2455 bytes --]
diff -uprN ave/c/BlueZ.cpp aventana/c/BlueZ.cpp
--- ave/c/BlueZ.cpp 2007-07-19 11:21:14.000000000 -0300
+++ aventana/c/BlueZ.cpp 2007-12-18 10:07:27.000000000 -0300
@@ -257,7 +257,7 @@ static int gen_attridseq_pdu(char *dst,
* Throws a Java exception if an error occured. Depending on the erro, you will
* surely have to call the method exit(1) after this excpetion is thrown
*/
-void throwException(JNIEnv *env, char *msg)
+void throwException(JNIEnv *env, const char *msg)
{
/* Throw a BlueZException in Java, with the given message */
jclass exception_cls;
@@ -1230,7 +1230,7 @@ JNIEXPORT jint JNICALL Java_de_avetana_b
* This jobject (a LocalServiceRecord if you are using the Avetana implementation) MUST implement a method
* toByteArray().
*/
-JNIEXPORT jint JNICALL Java_de_avetana_bluetooth_stack_BlueZ_createService
+JNIEXPORT jlong JNICALL Java_de_avetana_bluetooth_stack_BlueZ_createService
(JNIEnv *env, jclass obj, jobject srecord) {
bdaddr_t interface;
@@ -1409,7 +1409,7 @@ JNIEXPORT jint JNICALL Java_de_avetana_b
srh->srHandle = handle;
- return (jint)srh;
+ return (jlong)srh;
}
else return -1;
}
diff -uprN ave/c/Makefile.in aventana/c/Makefile.in
--- ave/c/Makefile.in 2005-06-30 11:59:08.000000000 -0300
+++ aventana/c/Makefile.in 2007-12-18 10:26:15.000000000 -0300
@@ -69,4 +69,4 @@ de_avetana_bluetooth_stack_BlueZ.h: clea
# Native language (C) library - libavetanaBT.so
libavetanaBT.so: BlueZ.cpp de_avetana_bluetooth_stack_BlueZ.h
- $(CC) -shared -lbluetooth $(CFLAGS) BlueZ.cpp -o $(BIN_DIR)/libavetanaBT.so $(LDFLAGS)
+ $(CC) -fPIC -shared -lbluetooth $(CFLAGS) BlueZ.cpp -o $(BIN_DIR)/libavetanaBT.so $(LDFLAGS)
diff -uprN ave/de/avetana/bluetooth/stack/BlueZ.java aventana/de/avetana/bluetooth/stack/BlueZ.java
--- ave/de/avetana/bluetooth/stack/BlueZ.java 2007-05-17 17:33:21.000000000 -0300
+++ aventana/de/avetana/bluetooth/stack/BlueZ.java 2007-12-18 10:11:24.000000000 -0300
@@ -413,7 +413,7 @@ public class BlueZ
* @return a positive integer is the process succeeds.
* @throws BlueZException
*/
- public static synchronized native int createService(LocalServiceRecord service) throws BlueZException;
+ public static synchronized native long createService(LocalServiceRecord service) throws BlueZException;
/**
* Updates an existing service record (the old <service record must be already stored in the BCC.)
[-- Attachment #3: Type: text/plain, Size: 308 bytes --]
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-18 13:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 8:55 [Bluez-users] error to compile avetana russogia4
2007-12-18 13:33 ` Manuel Naranjo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox