phpbar.de logo

Mailinglisten-Archive

Fehler beim linken von mysqlclient.a

Fehler beim linken von mysqlclient.a

Gnaedinger, Ralf Ralf.Gnaedinger at atm-computer.de
Mon Jul 5 12:17:29 CEST 2004


Hallo,

das compilieren meines Programms unter freeBSD 5.2 erhalte ich immer die
unten genannten Fehlermeldungen. Was kann ich tun damit
mein Programm erfolgreich compiliert wird?

gcc -O -g ticker.o score.o update.o core_sql.o helper.o battle.o cleanup.o
logging.o -o ticker -lmysqlclient -lcrypt -lz
battle.o: In function `resolve_avg_shots':
/usr/local/www/data/test/ticker/battle.c:610: undefined reference to `ceil'
/usr/local/www/data/test/ticker/battle.c:612: undefined reference to `ceil'
/usr/local/www/data/test/ticker/battle.c:614: undefined reference to `ceil'
/usr/local/www/data/test/ticker/battle.c:633: undefined reference to `floor'
/usr/local/www/data/test/ticker/battle.c:639: undefined reference to `floor'
/usr/local/www/data/test/ticker/battle.c:569: undefined reference to `ceil'
/usr/local/www/data/test/ticker/battle.c:583: undefined reference to `floor'
battle.o: In function `attack_targets':
/usr/local/www/data/test/ticker/battle.c:757: undefined reference to `ceil'
battle.o: In function `act_initiative':
/usr/local/www/data/test/ticker/battle.c:834: undefined reference to `floor'
/usr/local/www/data/test/ticker/battle.c:881: undefined reference to `rint'
battle.o: In function `divide_roids_helper':
/usr/local/www/data/test/ticker/battle.c:1168: undefined reference to `rint'
/usr/local/www/data/test/ticker/battle.c:1206: undefined reference to `rint'
battle.o: In function `divide_roids':
/usr/local/www/data/test/ticker/battle.c:1439: undefined reference to `rint'
battle.o: In function `divide_damage':
/usr/local/www/data/test/ticker/battle.c:1602: undefined reference to `rint'
battle.o:/usr/local/www/data/test/ticker/battle.c:1549: more undefined
references to `rint' follow
/usr/lib/libmysqlclient.a(password.o): In function `scramble':
password.o(.text+0x2f8): undefined reference to `floor'
password.o(.text+0x343): undefined reference to `floor'
/usr/lib/libmysqlclient.a(password.o): In function `check_scramble':
password.o(.text+0x418): undefined reference to `floor'
password.o(.text+0x463): undefined reference to `floor'
*** Error code 1

die Makefile gestaltet sich folgendermaßen:

LIB =	/usr/loacl/lib/mysql/libmysqlclient.a -lz
LIB =	-lmysqlclient -lcrypt -lz
SRC =	ticker.c score.c update.c core_sql.c helper.c battle.c cleanup.c
logging.c
OBJ =	$(SRC:.c=.o)

CC =	gcc
CFLAGS=	-O3 -g -Wall
LDFLAGS= -O3 $(LIB)

.SUFFIXES: .c .o

.PHONY: update

all:	ticker tick_sleep

test:	$(OBJ)
	gcc -O -g $(OBJ) -o ticker.test $(LIB)

ticker:	$(OBJ)
	gcc -O -g $(OBJ) -o ticker $(LIB)

sql:	test_sql.o core_sql.o
	gcc -O -g test_sql.o core_sql.o -o test_sql $(LIB)

tick_sleep: tick_sleep.o
	gcc -O -g tick_sleep.o -o tick_sleep

update:	
	cp ticker ticker.old
	cp ticker.test ticker

clean:	
	rm -f *.o ticker *~ tick_sleep

$(OBJ): ticker.h logging.h
tick_sleep.o:	tick_sleep.c

gruß

ralf

-- 
Infos zur Mailingliste, zur Teilnahme und zum An- und Abmelden unter
-->>  http://www.4t2.com/mysql 


php::bar PHP Wiki   -   Listenarchive