mysql.h 을 사용해서 컴파일 하니깐 아래와 같은 메세지가 뜨네엽
./a.out: error while loading shared libraries: libmysqlclient.so.10: cannot open shared object file: No such file or di
rectory 왜 이렇게 되는지 가르쳐 주세여
실행할 때 libmysqlclient.so.10 을 찾지 못하는 문제입니다. 이 라이브러리가 있는 디렉토리를 /etc/ld.so.conf 에 추가하고 ldconfig 를 실행하거나 LD_LIBRARY_PATH 를 지정하면 해결됩니다. 링크 시에도 -L 옵션으로 경로를 줘야 합니다.