Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

MinGW DLL build saga continues...: msg#00118

db.mysql.c++

Subject: MinGW DLL build saga continues...

Thanks to some help from list member Robin, I've got a MinGW building MySQL++ as a DLL. Unfortunately, there's a new problem, which is that MinGW can't link programs to it.

VC++ builds DLLs just fine, so there's a limit to how much more effort I'm willing to put into this. So, I hope some of you MinGW users out there will try this, and see if you can figure out what MinGW is complaining about.

To see the problem, check out a copy of the current repository version of MySQL++, and type "makemake mingw" in the project directory to build the DLL. The examples will fail to build, but nevermind that for now. Try to build this simple program instead:

#include <mysql++.h>

int main()
{
mysqlpp::Connection c;
mysqlpp::Date d;
return 0;
}

The command line for that is:

g++ -Ic:\mysql\include -Ilib foo.cpp -o foo.exe \
-Lc:\mysql\lib\mingw -lmysql -Llib -lmysqlpp

...assuming that you call it foo.cpp and put it in the base project directory.

You'll get these errors:

c:\tmp/ccuqhaaa.o(.text$_ZN7mysqlpp4DateD1Ev[mysqlpp::Date::~Date()]+0xb):foo.cp
p: undefined reference to `vtable for mysqlpp::Date'
c:\tmp/ccuqhaaa.o(.text$_ZN7mysqlpp4DateC1Ev[mysqlpp::Date::Date()]+0x16):foo.cp
p: undefined reference to `vtable for mysqlpp::Date'
collect2: ld returned 1 exit status

According to what I've found searching online, this means the linker believes the subclass isn't defining all of the virtual functions declared in its parent class(es). That's B.S., of course, because this code works with many other platforms. Perhaps a clue lies in the mangled names above: anyone have a tool to demangle arbitrary g++ symbols? (like nm -C does)

Notice that it doesn't complain about Connection, only Date. I've tried several other classes here. The Exception subclasses compile and link, for instance. But Fields and Row do not. What do these problem classes have in common with each other, but not with the working classes?

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation