Based on your comments, I tried the following change to the lib/ and
examples/ Makefile.mingw file:
CXXFLAGS=-Ic:\mysql\include -I.. -DMYSQLPP_NO_DLL -O2 -c
CXXFLAGS=-I/c/mysql/include -I.. -DMYSQLPP_NO_DLL -O2 -c
And it "seems" to have compiled alright!
Examples and linker paths all had to be changed from c:\ to the /c/ type
format. Not sure if this will help anyone else, but it's what got it to
almost work for me. I say almost because now I'm getting the following
linker error when it tries to build the examples:
MySQL++ library built successfully.
The system cannot find the file specified.
g++ -L..\lib -L/c/mysql/lib/gcc -L../lib resetdb.o util.o -oresetdb.exe
reference to `mysql_shutdown@4'
collect2: ld returned 1 exit status
make.exe: *** [resetdb.exe] Error 1
I am quite sure that the mysqlpp static library is named libmysqlpp.a and is
in the ../lib directory, the mysql client dll is named libmysqlclient.dll
and is located in the second path listed in the system PATH variable, the
libmysqlclient.a import library to the mysql client dll is named
libmysqlclient.a and is in the /c/mysql/lib/gcc directory. Am I missing
something? I have redeveloped the libmysqlclient.a file using dlltool off
of the libmysqlclient.dll, exactly as outlined in the README.mingw file.
Any more ideas?
From: Warren Young [mailto:mysqlpp@stripped]
Sent: Monday, August 29, 2005 4:05 PM
To: MySQL++ Mailing List
Subject: Re: more mingw build problems
Patrick McMichael wrote:
> files to C:\mysql\include - which is the location of my mysql include
> (i.e. mysql.h is in that directory)?
You say the file is there, and g++ says otherwise. I've tried it again
with the most recent tarball, and it works fine here. The only
difference I can see between your system and mine, from what you've
posted, is that you installed MySQL++ somewhere other than c:\mysql++,
but I tested that, too. I don't know what else to tell you.
> Is the dlltool method somehow better?
I think you mean to ask whether the def file that is [supposed to be!]
distributed with MySQL++ is better than the one pexports generates. And
the answer to that question is, "yes". Unfortunately, it got left out
of the tarball. Expect 2.0.4 soon.
Not that this fixes your problem. You aren't even getting the object
files built, so worries about linking to the MySQL DLL are irrelevant at
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus