16 Feb, 2011, Eithon wrote in the 1st comment:
Votes: 0
Hello all,

I'm a complete novice with coding, so I apologize in advance. :) I have recently been checking out codebases and playing around with them learning some interesting things along the way. I am currently trying to get Eye of the Cyclops 2.1 to work. I am using Cygwin on 32-bit Vista.

The game makes fine, until the end:

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [rom] Error 1

This is what is in the makefile:

rom: $(OBJ_FILES)
$(RM) -f $(EXE)
$(CC) $(L_FLAGS) -o $(EXE) $(OBJ_FILES) -lcrypt -lm -L/mysql-5.1.54/libmysql -lmysqlclient

I have mysql installed in c:\cygwin\mysql-5.1.54 (I ./configured it, then successfully make && make install, I think that's all I have to do to install it but not sure). I have searched my harddrive for a file named "mysqlclient" and there isn't one. There are however files named libmysqlclient.a, libmysqlclient.la and libmysqlclient.lai in c:\cygwin\mysql-5.1.54\libmysql\.libs

I am thinking this error is because I installed mysql in the wrong directory, but I've been messing with it for a few hours, changing directories and filenames and I just cannot figure it out. I'm sorry if this question has a duplicate thread, but the search function isn't working for me. Thanks for any help you can give!
16 Feb, 2011, Eithon wrote in the 2nd comment:
Votes: 0
Correction to my original post:

Makefile looks like this:

rom: $(OBJ_FILES)
$(RM) -f $(EXE)
$(CC) $(L_FLAGS) -o $(EXE) $(OBJ_FILES) -lcrypt -lm -L/usr/lib/mysql -lmysqlclient
16 Feb, 2011, David Haley wrote in the 3rd comment:
Votes: 0
Did you try downloading the MySQL package through the Cygwin package manager? (It might not be available, but I suspect but is.)

It's telling you that the client libraries were not correctly installed to the Cygwin directories. libmysqlclient.a is indeed the file it's looking for, but you wouldn't want to just move it – that might confuse things.
16 Feb, 2011, Eithon wrote in the 4th comment:
Votes: 0
David Haley said:
Did you try downloading the MySQL package through the Cygwin package manager? (It might not be available, but I suspect but is.)

It's telling you that the client libraries were not correctly installed to the Cygwin directories. libmysqlclient.a is indeed the file it's looking for, but you wouldn't want to just move it – that might confuse things.


David,

Yep I did check the Cygwin package manager and MySQL isn't on there. I downloaded the .tar.gz file from the MySQL web site. It took some research to get MySQL to compile in Cygwin, but after adding some arguments to ./configure it compiles without any errors, so I'm pretty sure it's installing everything it should.

Thanks,
Eithon
16 Feb, 2011, Tyche wrote in the 5th comment:
Votes: 0
libmysqlclient.a is the name of the library.
If it's in c:\cygwin\mysql-5.1.54\libmysql\.libs then
$(CC) $(L_FLAGS) -o $(EXE) $(OBJ_FILES) -lcrypt -lm -L/mysql-5.1.54/libmysql/.libs -lmysqlclient
That will get you past the linkage error, however '.libs' is the build output not the install directory.

Try ./configure –help in your mysql directory.
That will usually tell you the default installation directory.
16 Feb, 2011, Davion wrote in the 6th comment:
Votes: 0
You might just be installing the MySQL server. Look around for libmysql or mysql-dev
17 Feb, 2011, Eithon wrote in the 7th comment:
Votes: 0
Tyche said:
libmysqlclient.a is the name of the library.
If it's in c:\cygwin\mysql-5.1.54\libmysql\.libs then
$(CC) $(L_FLAGS) -o $(EXE) $(OBJ_FILES) -lcrypt -lm -L/mysql-5.1.54/libmysql/.libs -lmysqlclient
That will get you past the linkage error, however '.libs' is the build output not the install directory.

Try ./configure –help in your mysql directory.
That will usually tell you the default installation directory.


Thanks very much, that fixed the problem and got it to install clean. I truly appreciate you all for helping me out!

Thanks,
Eithon
0.0/7