|
|
Choosing A Webhost: |
MinGW DLL build saga continues...: msg#00118db.mysql.c++
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> |
|---|---|---|
| Previous by Date: | Re: problem with building examples, Warren Young |
|---|---|
| Next by Date: | Re: MinGW DLL build saga continues..., Warren Young |
| Previous by Thread: | problem with building examples, archana maram |
| Next by Thread: | Re: MinGW DLL build saga continues..., Warren Young |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |