뒷 부분에 보시면
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
-lmysqlclient
로 되어 있습니다. mysqlclient가 안깔려있거나 깔려는 있는데 경로 설정이 안되어서 그런것 같습니다.
mysqlclient를 까시거나 이미 인스톨하셨으면 mysqlclient.so 등이 들어있는 폴더를 /etc/ld.so.conf에 추가해 주시고 ldconfig 를 실행해 주세요.
mysqlclient 가 없어서 linker 에러가
mysqlclient 가 없어서 linker 에러가 나네요. 제일 끝 부분을 보세요.
질문드립니다!
gcc -O3 -w -I. -I./include -c -o main.o main.c
gcc -O3 -w -I. -I./include -c -o init.o init.c
gcc -O3 -w -I. -I./include -c -o configfile.o configfile.c
gcc -O3 -w -I. -I./include -c -o util.o util.c
gcc -O3 -w -I. -I./include -c -o net.o net.c
gcc -O3 -w -I. -I./include -c -o buf.o buf.c
gcc -O3 -w -I. -I./include -c -o msignal.o msignal.c
gcc -O3 -w -I. -I./include -c -o link.o link.c
gcc -O3 -w -I. -I./include -c -o sasql.o sasql.c
gcc -O3 -w -I. -I./include -c -o const.o const.c
gcc -O3 -w -I. -I./include -c -o des.o des.c
gcc -O3 -w -I. -I./include -c -o callfromac.o callfromac.c
gcc -O3 -w -I. -I./include -c -o callfromcli.o callfromcli.c
gcc -O3 -w -I. -I./include -c -o object.o object.c
gcc -O3 -w -I. -I./include -c -o handletime.o handletime.c
gcc -O3 -w -I. -I./include -c -o function.o function.c
gcc -O3 -w -I. -I./include -c -o log.o log.c
gcc -O3 -w -I. -I./include -c -o autil.o autil.c
gcc -O3 -w -I. -I./include -c -o attestation.o attestation.c
gcc -O3 -w -I. -I./include -c -o saacproto_cli.o saacproto_cli.c
gcc -O3 -w -I. -I./include -c -o saacproto_util.o saacproto_util.c
gcc -O3 -w -I. -I./include -c -o lssproto_serv.o lssproto_serv.c
gcc -O3 -w -I. -I./include -c -o lssproto_util.o lssproto_util.c
gcc -O3 -w -I. -I./include -o ./gmsvjt main.o init.o configfile.o util.o net.o b
uf.o msignal.o link.o sasql.o const.o des.o callfromac.o callfromcli.o object.o
handletime.o function.o log.o autil.o attestation.o saacproto_cli.o saacproto_ut
il.o lssproto_serv.o lssproto_util.o char/libchar.a npc/libnpc.a map/libmap.a it
em/libitem.a magic/libmagic.a battle/libbattle.a npc_lua/libnpc_lua.a lua/liblua
.a -lm -lpthread -ldl -L /usr/lib/mysql/ -lmysqlclient -lz
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
-lmysqlclient
collect2: ld returned 1 exit status
make: *** [gmsvjt] Error 1
이부분에서 어느 부분을 말씀하시는거에요??
//답글로 드릴거 댓글로 달아버렷네요...ㅠ
뒷 부분에
뒷 부분에 보시면
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
-lmysqlclient
로 되어 있습니다. mysqlclient가 안깔려있거나 깔려는 있는데 경로 설정이 안되어서 그런것 같습니다.
mysqlclient를 까시거나 이미 인스톨하셨으면 mysqlclient.so 등이 들어있는 폴더를 /etc/ld.so.conf에 추가해 주시고 ldconfig 를 실행해 주세요.
-
아아, 이거 mysql가 깔려 있지 않아서 뜨는 문제인건가요..?
헤더파일만드로는 해결 안되는거군요..
헤더파일은 컴파일할때 쓰이며 라이브러리는 링크할 때
헤더파일은 컴파일할때 쓰이며
라이브러리는 링크할 때 쓰입니다.
헤더파일 - 함수 호출시 어떻게 호출할지 기록된 곳. 함수로 점프할 곳은 미정으로 남겨둠. 링크시에 채워짐.
라이브러리 - 실제 함수가 점프해서 수행하는 동작이 기록된 곳.
object file, symbol, namemangling 정도의 키워드 공부하셔야 할 것 같습니다.
댓글 달기