dbTalk Databases Forums  

RE: [MySQL++]Good/Bad News:MinGW Support

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


Discuss RE: [MySQL++]Good/Bad News:MinGW Support in the mailing.database.mysql-plusplus forum.



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

Default RE: [MySQL++]Good/Bad News:MinGW Support - 12-30-2005 , 09:33 AM







Although I did spend some time researching this problem, I gotta admit I
never got very far. As it turns out, linking DLLs/Libs/SO's between c =
and
c++ and between platforms is a real pain in the @$$ - hence the term =
"dll
hell". I'm not sure which code you mean should include __stdcall, but I =
was
under the impression that for C++ apps building a DLL in mingw, it =
should be
exported as __declspec(dllexport) (just like MS does it in Visual =
Studio).
But I could most definitely be wrong. Then, when you're importing them =
into
an application via the dll's .lib file, you just change that to
__declspec(dllimport). Usually, this is handled in the form of macros. =
As
for __stdcall, I thought that was for standard c functions like what
*should* be in the libmysqlclient.dll. The confusing part about all of =
this
is it basically is just a way of determining name mangling in the =
function
names inside of the dll, and the way that parameters are passed between
functions.

Ugh.

Any way Warren or Chris could enlighten us and clear any of this up?

-----Original Message-----
From: Death Gauge [mailto:clay_hg (AT) hotmail (DOT) com]=20
Sent: Thursday, December 29, 2005 11:30 PM
To: plusplus (AT) lists (DOT) mysql.com
Subject: RE: [MySQL++]Good/Bad News:MinGW Support

I was about to include the method to get it to compile that worked for =
me=20
but I ran into problems when I tried to compile the examples with the=20
DLL/LIB. Somewhere in the code there should be virtuals __stdcall=20
function(); in the headers so that it can pull them out of the DLL but I =

can't find any. I'm stumped at what to do cause the DLL/LIB compiled =
fine=20
and then it oddly does this with compiling the examples because it can't =

find he part to read from the DLL to work. Any ideas?

C:\mysqlpp\examples>make
g++ -L..\lib\debug debug/resetdb.o debug/util.o =
-odebug/resetdb.exe=20
-lmys
qlpp -lmysqlclient
debug/resetdb.o(.text$_ZN7mysqlpp5QueryD1Ev[mysqlpp::Query::~Query()]+0x3=
9):
rese
tdb.cpp: undefined reference to `vtable for mysqlpp::Query'
debug/resetdb.o(.text$_ZN7mysqlpp5QueryD1Ev[mysqlpp::Query::~Query()]+0x4=
8):
rese
tdb.cpp: undefined reference to `vtable for mysqlpp::Query'
debug/resetdb.o(.text$_ZN7mysqlpp5QueryD1Ev[mysqlpp::Query::~Query()]+0x5=
7):
rese
tdb.cpp: undefined reference to `vtable for mysqlpp::Query'
debug/resetdb.o(.text$_ZN7mysqlpp5QueryD1Ev[mysqlpp::Query::~Query()]+0x6=
3):
rese
tdb.cpp: undefined reference to `vtable for mysqlpp::Query'
debug/resetdb.o(.text$_ZN7mysqlpp5QueryD1Ev[mysqlpp::Query::~Query()]+0x2=
1a)
:res
etdb.cpp: undefined reference to `VTT for mysqlpp::Query'
debug/resetdb.o(.text$_ZN7mysqlpp5QueryD1Ev[mysqlpp::Query::~Query()]+0x2=
40)
:res
etdb.cpp: undefined reference to `VTT for mysqlpp::Query'
debug/util.o(.text$_ZN7mysqlpp4DateD1Ev[mysqlpp:ate::~Date()]+0xb):util=
..cp
p:=20
u
ndefined reference to `vtable for mysqlpp:ate'
debug/util.o(.text$_ZN7mysqlpp4DateC1ERKNS_12ColData_Tmp lINS_12const_stri=
ngE
EE[m
ysqlpp:ate:ate(mysqlpp::ColData_Tmpl<mysqlpp:: const_string>=20
const&)]+0x45):u
til.cpp: undefined reference to `vtable for mysqlpp:ate'
debug/util.o(.text$_ZN7mysqlpp3RowC1Ev[mysqlpp::Row::Row()]+0x5b):util.cp=
p:=20
unde
fined reference to `vtable for mysqlpp::Row'
debug/util.o(.text$_ZN7mysqlpp3RowC1Ev[mysqlpp::Row::Row()]+0x67):util.cp=
p:=20
unde
fined reference to `vtable for mysqlpp::Row'
collect2: ld returned 1 exit status
make: *** [resetdb.exe] Error 1






--Death Gauge
"How do you gauge your death?!"




----Original Message Follows----
From: "Patrick McMichael" <p.s.mcmichael (AT) gats-inc (DOT) com>
To: <plusplus (AT) lists (DOT) mysql.com>
Subject: RE: [MySQL++]Good/Bad News:MinGW Support
Date: Thu, 29 Dec 2005 23:01:33 -0500

I'm pretty sure it's looking for the mysql client library,
libmysqlclient.dll (which ships with mysql), and that the function
mysql_more_results is a C function in that library. Unfortunately, I'm =
not
sure how you would link to that instead, since with all the building =
I've
done, it's been automatically setup to link to libmysqlclient.dll (or at
least the corresponding .lib).

BTW, how'd you get it to compile?

Make sure to let us know if you get this working! It would be SWEET.

-Patrick

-----Original Message-----
From: Death Gauge [mailto:clay_hg (AT) hotmail (DOT) com]
Sent: Thursday, December 29, 2005 9:16 PM
To: plusplus (AT) lists (DOT) mysql.com
Subject: [MySQL++]Good/Bad News:MinGW Support

Good News: Got the lib to compile and the dll to work and the examples =
to
compile with not a single error/warning/or problem.

Bad News: The examples all return an error saying "The procedure entry =
point

mysql_more_results could not be located in the dynamic link library
LIBMYSQL.dll."

Any ideas for fixing this problem?

--Death Gauge
"How do you gauge your death?!"

__________________________________________________ _______________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/o...ave/direct/01/


--
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...mail (DOT) com

__________________________________________________ _______________
Don't just search. Find. Check out the new MSN Search!=20
http://search.msn.click-url.com/go/o...ave/direct/01/


--=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
  #2  
Old   
Chris Frey
 
Posts: n/a

Default Re: [MySQL++]Good/Bad News:MinGW Support - 01-03-2006 , 01:57 PM






On Fri, Dec 30, 2005 at 10:33:30AM -0500, Patrick McMichael wrote:
Quote:
Any way Warren or Chris could enlighten us and clear any of this up?
I'd love to help, but don't have the time. All I know about DLLs on Windows
is some kind of keyword in the source code, and a proper .DEF file.
When writing DLL's in C, you have to list every function you export in
the DEF file. I assume this translates to C++ as well.

I admit I haven't been following this too closely, since I don't have time
to help.

- Chris


--
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: [MySQL++]Good/Bad News:MinGW Support - 01-03-2006 , 02:44 PM



Patrick McMichael wrote:
Quote:
Any way Warren or Chris could enlighten us and clear any of this up?
I already beat my head against this wall. Search the archives for the
blow-by-blow. I publically gave up, and "Death Gauge" was one of the
people who showed up after that saying that he could do it. If he -- or
anyone else -- gets it working, fine. If not, well, I've convinced
myself that there is no easy fix, and since it isn't my itch, I have no
further interest in scratching at it.

Sorry to be blunt, but I've thrown all the time at this I'm going to.

--
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.