Read Me
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
Build:
# make
Requirements:
openobex http://sourceforge.net/projects/openobex/
bluez http://www.bluez.org/redirect.php?url=http%3A%2F%2Fbluez.sf.net%2Fdownload%2Fbluez-libs-3.7.tar.gz
http://www.bluez.org/redirect.php?url=http%3A%2F%2Fbluez.sf.net%2Fdownload%2Fbluez-utils-3.7.tar.gz
sqlite v3 http://www.sqlite.org/sqlite-3.3.8.tar.gz
Frecuent Problems:
There is an alternative method to compile this in a KUbuntu.
If you are using another distribution, maybe it will be similar, but with another names...
* When you compile (make) the Trabuco utility, it can appear some errors like these:
busca_y_envia.c:8:33: error: bluetooth/bluetooth.h: No existe el fichero ó directorio
busca_y_envia.c:9:27: error: bluetooth/hci.h: No existe el fichero ó directorio
busca_y_envia.c:10:31: error: bluetooth/hci_lib.h: No existe el fichero ó directorio
param_trabuco.h:4:21: error: sqlite3.h: No existe el fichero ó directorio
myobex_test.c:15:27: error: openobex/obex.h: No existe el fichero ó directorio
If this error appear, it is due to you have not installed the Requirements. I have installed them by using APT, and the packages that we need are those that contains the development files.
apt-get install libbluetooth1-dev
apt-get install sqlite3-dev
apt-get install libopenobex-1.0-0-dev
This actualitations must be correct these errors.
* Another problems that we can do are similar than:
gcc -c -Wall -Werror -Os myobex_test.c
gcc -c -Wall -Werror -Os myobex_test_client.c
cc1: warnings being treated as errors
This means that the warnings that they appear while compilation must be caught like errors, with wich the compilation will not complete.
These errors appear only in some GCC versions (I have version 4.0.3, and I have this problem. Maybe it can be because this version is dedicated to 64-bits, and I have one micro with 32-bits).
To correct this problem, we can open the Makefile, and in the lines
OBJFLAGS=-c -Wall -Werror -Os
CCFLAGS=-Wall -Werror -Os
SCCFLAGS=-Wall -Werror -Os -static
we must to delete -Werror from it, likle this
OBJFLAGS=-c -Wall -Os
CCFLAGS=-Wall -Os
SCCFLAGS=-Wall -Os -static
Do the same in the Makefile-estatico.
Another solution is to change the defect compiler in the CPU.
If you "write gcc -dumpversion" it shows the gcc version you are using. If this version is 4.0, maybe you have the same problem than me. And other versions meybe too.
For to change the defect version, you primary must to have another version of gcc compiler.
If you don't, you can install it by using apt-get:
apt-get install gcc-3.3 (this is what I have used).
And for to do this gcc the default compiler, you can do:
cd /usr/bin
sudo rm gcc gccbug
sudo ln -s gccbug-3.3 gccbug
sudo ln -s gcc-3.3 gcc
* The problems related to
gcc: /lib/libbluetooth.a: No existe el fichero ó directorio
gcc: /usr/local/lib/libopenobex.a: No existe el fichero ó directorio
gcc: /usr/local/lib/libsqlite3.a: No existe el fichero ó directorio
do not due to you have not this files, but that this files do not be in the appropriate directories.
I make a link from these files into good directories, and it works ok.
ln -s /usr/lib/libbluetooth.a /lib/
ln -s /usr/lib/libopenobex.a /usr/local/lib/
ln -s /usr/lib/libsqlite3.a /usr/local/lib/
It deppends of your distribution, this datas can be change a little.
Or it can do by modifying the line in wich this information is caught.
SLIBS=/lib/libbluetooth.a /usr/local/lib/libopenobex.a /usr/local/lib/libsqlite3.a
You can put the corect direction in your computer where the files are allocated.
* The problems that say: /usr/lib/libsqlite3.a(os_unix.o): En funcion `sqlite3OsOpenDirectory': referencia a `pthread_self' sin definir
are due to it has not included the "pthread" library in the Makefile.
If you put "-lpthread" into Line LIBS=... and you put "/usr/lib/libpthread.a" into line SLIBS=... it must go good.