[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnokii on Mac OS X
From: |
Olivier Kaloudoff |
Subject: |
Re: Gnokii on Mac OS X |
Date: |
Mon, 26 May 2003 13:08:18 +0200 (CEST) |
Hi Kurt,
I successfully compiled gnokii here,
here is what you may do to have your dynamic library
compiled ok:
the following is a combination of all I did,
dynamic linking first, and finally the static way:
---------------------------------------------------------
(edit the common/Makefile with vi, or any editor, and change
-shared with -shared-libgcc)
[OK-Computer:/sw/src/gnokii-0.5.0] # vi common/Makefile
----
libgnokii.so: $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o
$(CC) -shared -Wl,-soname,$(GNOKII_LIBM) -o $(GNOKII_LIBMM)
$(OBJS) phones/PHONES.o links/LINKS.o
----
libgnokii.so: $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o
$(CC) -shared-libgcc -Wl,$(GNOKII_LIBM) -o $(GNOKII_LIBMM) $(OBJS)
phones/PHONES.o links/LINKS.o
---------------------------------------------------------
[OK-Computer:/sw/src/gnokii-0.5.0] # vi common/Makefile
(add the following target)
snprintf.o:
$(CC) -c snprintf.c -o snprintf.o $(CFLAGS) -Wno-long-double
---------------------------------------------------------
linking with ld -r -o libgnokii.so.1.0 is ok:
---------------------------------------------------------
[Olivier-Kaloudoffs-Computer:src/gnokii-0.5.0/common] root# ld -dynamic -r
-o libgnokii.so.1.0 gsm-api.o gsm-error.o gsm-statemachine.o cfgreader.o
device.o vcal.o vcard.o gsm-networks.o gsm-filetypes.o gsm-ringtones.o
gsm-bitmaps.o gsm-sms.o gsm-call.o gsm-encoding.o gsm-common.o sms-nokia.o
nokia-decoding.o compat.o misc.o snprintf.o phones/PHONES.o links/LINKS.o
devices/DEVICES.o
[Olivier-Kaloudoffs-Computer:src/gnokii-0.5.0/common] root# ln -s
libgnokii.so.1.0 libgnokii.so
[Olivier-Kaloudoffs-Computer:src/gnokii-0.5.0/common] root# make
make: Nothing to be done for `all'.
---------------------------------------------------------
[Olivier-Kaloudoffs-Computer:/sw/src/gnokii-0.5.0] root# cd gnokii
[Olivier-Kaloudoffs-Computer:src/gnokii-0.5.0/gnokii] root# make
gcc gnokii.o ../getopt/libgetopt.a -L../common -lgnokii -L/usr/X11R6/lib
-lXpm -lX11 -o gnokii
ld: can't locate file for: -lgnokii
make: *** [gnokii] Error 1
---------------------------------------------------------
Use this at last if you did not succeed to create the
shared .so library .
it will create the libgnokii.a static library, that
you may next link statically to your binary
---------------------------------------------------------
[Olivier-Kaloudoffs-Computer:src/gnokii-0.5.0/common] root# libtool -o
libgnokii.a gsm-api.o gsm-error.o gsm-statemachine.o cfgreader.o device.o
vcal.o vcard.o gsm-networks.o gsm-filetypes.o gsm-ringtones.o
gsm-bitmaps.o gsm-sms.o gsm-call.o gsm-encoding.o gsm-common.o sms-nokia.o
nokia-decoding.o compat.o misc.o snprintf.o phones/PHONES.o links/LINKS.o
devices/DEVICES.o
Regards,
Olivier Kaloudoff
French Gnokii User