This is a discussion on libmysqlclient_r.so.16: open failed: No such file or directory within the MySQL Database forums, part of the Database Forums category; Hello, Sorry if this gets posted twice, but I didn't see it so I am posting it again. I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
Sorry if this gets posted twice, but I didn't see it so I am posting it again. I am a fairly new to MySQL, but am trying to create a simple test program that uses Pthreads with MySQL (this is on Solaris 10). I started building my test app using the linker line LIBS = -I/opt/mysql/mysql/include -L/opt/mysql/mysql/lib -lmysqlclient -lsocket -lnsl -lrt -lpthread but changed over to LIBS = -I/opt/mysql/mysql/include -L/opt/mysql/mysql/lib - lmysqlclient_r -lsocket -lnsl -lrt -lpthread to try and make my application "thread safe". When I run, I am getting an error on the console: ld.so.1: mysql_thread_example: fatal: libmysqlclient_r.so.16: open failed: No such file or directory Killed It is really not even getting into 'main'. Here is my complete Makefile: PROGRAM = pthreads.c OBJS = $(CSRCS:.c=.o) CSRCS = pthreads.c CC = gcc LINKER = gcc CFLAGS = -Wall -m64 -O3 -mtune=k8 -g LDFLAGS = -m64 LIBS = -I/opt/mysql/mysql/include -L/opt/mysql/mysql/lib -lpthread - lmysqlclient_r -lsocket -lnsl -lrt all: $(PROGRAM) $(PROGRAM): $(OBJS) $(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM) $(OBJS): %.o: %.c %.h $(CC) -c $(CFLAGS) $*.c clean: rm -f $(OBJS) $(PROGRAM) Finally, I tried this with the sample program posted in the MySQL docs (28.2.16) "How to Make a Threaded Client", and it dies the same way. Any help or advice would be greatly appreciated. Mitch Is it possible that this is a 64-bit vs. 32-bit issue? If so, do I need to get a different binary? Recompile? |