dbTalk Databases Forums  

more mingw build problems

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss more mingw build problems in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Patrick McMichael
 
Posts: n/a

Default more mingw build problems - 08-29-2005 , 11:06 AM






--MIMEStream=_0+185527_2458562826529_14322329374
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello All,

Trying to get this thing to build (as a static library) with the
latest version of code in the subversion trunk. When I run "makemake mingw"
from the root directory, I get the following errors:

=20

C:\Eclipse_Workspace\MySQL++>makemake mingw

g++ -Ic:\mysql\include -I.. -DMYSQLPP_NO_DLL -O2 -c coldata.cpp

In file included from const_string.h:32,

from coldata.h:37,

from coldata.cpp:27:

defs.h:34:19: mysql.h: No such file or directory

In file included from const_string.h:32,

from coldata.h:37,

from coldata.cpp:27:

defs.h:66: error: `MYSQL_FIELD' does not name a type

In file included from exceptions.h:34,

from coldata.h:40,

from coldata.cpp:27:

connection.h:142: error: `my_bool' has not been declared

connection.h:144: error: ISO C++ forbids declaration of `compress' with no
type

connection.h:159: error: `my_bool' has not been declared

connection.h:160: error: ISO C++ forbids declaration of `compress' with no
type

connection.h:355: error: `st_mysql_options' does not name a type

connection.h:422: error: `my_ulonglong' does not name a type

connection.h:433: error: `my_ulonglong' does not name a type

connection.h:483: error: expected `;' before '(' token

connection.h:540: error: `MYSQL' does not name a type

connection.h: In member function `void mysqlpp::Connection::close()':

connection.h:167: error: `mysql_' undeclared (first use this function)

connection.h:167: error: (Each undeclared identifier is reported only once
for each function it appe

ars in.)

connection.h:167: error: `mysql_close' undeclared (first use this function)

connection.h: In member function `const char* mysqlpp::Connection::error()':

connection.h:224: error: `mysql_' undeclared (first use this function)

connection.h:224: error: `mysql_error' undeclared (first use this function)

connection.h: In member function `int mysqlpp::Connection::errnum()':

connection.h:231: error: `mysql_' undeclared (first use this function)

connection.h:231: error: `mysql_errno' undeclared (first use this function)

=20

... and so on and so forth for quite some time with some similar errors in
type_info.h

=20

any ideas? =20

=20

I am attempting to build this on Windows XP with MinGW g++ version 3.4.2.

=20

Thanks,

=20

-Patrick


--MIMEStream=_0+185527_2458562826529_14322329374--

Reply With Quote
  #2  
Old   
cwic
 
Posts: n/a

Default Re: more mingw build problems - 08-29-2005 , 11:12 AM






Hello Patrick,

Monday, August 29, 2005, 7:06:40 PM, you wrote:

PM> defs.h:34:19: mysql.h: No such file or directory

you must instal mySQL library (set correct include path) first.

--
Best regards,
cwic mailto:cwic (AT) mail (DOT) ru


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: more mingw build problems - 08-29-2005 , 12:43 PM



Patrick McMichael wrote:
Quote:
defs.h:34:19: mysql.h: No such file or directory
Didn't read README.mingw, did you?

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #4  
Old   
Patrick McMichael
 
Posts: n/a

Default Re: more mingw build problems - 08-29-2005 , 01:43 PM



--MIMEStream=_0+277861_94480256720316_0976979551
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

All,

I don't really understand what the problem is - could you be
more specific? I've read the mingw readme file, and looked at the
Makefile.mingw in the trunk/lib file and it seems to be pointing the header
files to C:\mysql\include - which is the location of my mysql include files
(i.e. mysql.h is in that directory)? Am I missing something else?

I used pexports to generate the .a file from the
libmysqlclient.dll, based on the directions that were up on the site awhile
ago, do I need to rewrite that exports file if I haven't changed which dll
I'm going to be using? Is the dlltool method somehow better?



Thanks,



-Patrick


--MIMEStream=_0+277861_94480256720316_0976979551--

Reply With Quote
  #5  
Old   
Warren Young
 
Posts: n/a

Default Re: more mingw build problems - 08-29-2005 , 03:05 PM



Patrick McMichael wrote:
Quote:
files to C:\mysql\include - which is the location of my mysql include files
(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.

Quote:
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
this point.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #6  
Old   
Patrick McMichael
 
Posts: n/a

Default RE: more mingw build problems - 08-29-2005 , 04:21 PM



Based on your comments, I tried the following change to the lib/ and
examples/ Makefile.mingw file:

I changed:

CXXFLAGS=3D-Ic:\mysql\include -I.. -DMYSQLPP_NO_DLL -O2 -c

to:

CXXFLAGS=3D-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
-lmysqlpp -lmysqlclient
.../lib/libmysqlpp.a(connection.o)(.text+0x395):connection .cpp: undefined
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?

Thanks,=20

-Patrick

-----Original Message-----
From: Warren Young [mailto:mysqlpp (AT) etr-usa (DOT) com]=20
Sent: Monday, August 29, 2005 4:05 PM
To: MySQL++ Mailing List
Subject: Re: more mingw build problems

Patrick McMichael wrote:
Quote:
files to C:\mysql\include - which is the location of my mysql include
files
(i.e. mysql.h is in that directory)?
You say the file is there, and g++ says otherwise. I've tried it again=20
with the most recent tarball, and it works fine here. The only=20
difference I can see between your system and mine, from what you've=20
posted, is that you installed MySQL++ somewhere other than c:\mysql++,=20
but I tested that, too. I don't know what else to tell you.

Quote:
Is the dlltool method somehow better?
I think you mean to ask whether the def file that is [supposed to be!]=20
distributed with MySQL++ is better than the one pexports generates. And=20
the answer to that question is, "yes". Unfortunately, it got left out=20
of the tarball. Expect 2.0.4 soon.

Not that this fixes your problem. You aren't even getting the object=20
files built, so worries about linking to the MySQL DLL are irrelevant at=20
this point.

--=20
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...-inc (DOT) com




--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #7  
Old   
Warren Young
 
Posts: n/a

Default Re: more mingw build problems - 08-29-2005 , 04:41 PM



Patrick McMichael wrote:
Quote:
CXXFLAGS=-I/c/mysql/include -I.. -DMYSQLPP_NO_DLL -O2 -c
The only way that could be is if you're using the Cygwin compiler.
MinGW's g++ shouldn't understand /c/... If you have both on your
system, your PATH isn't set correctly if you want to use MinGW.

If you're trying to use Cygwin's compiler in -mno-cygwin mode, that
isn't supported. Patches thoughtfully considered.

Quote:
reference to `mysql_shutdown@4'
This is the def file problem. 2.0.4 out soon. For real this time.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.