dbTalk Databases Forums  

Re: Using MySQL++ in Your Own Projects

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


Discuss Re: Using MySQL++ in Your Own Projects in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Warren Young
 
Posts: n/a

Default Re: Using MySQL++ in Your Own Projects - 10-25-2006 , 08:10 AM






Klemen Dovrtel wrote:
Quote:
I read in readme file that i should "Add a .cpp file
to the solution so it _knows_ it's a C/C++
solution."....Which .cpp file is that?
It doesn't matter. If you don't have one, make an empty one. The point
is, VC++ isn't smart enough to understand that a project is a C++
project if there are no files with a .cpp extension in it, so it won't
show the C++ configuration options.

Quote:
I copied the
lib directory to my project,
That should not be necessary. You can reference the built MySQL++
library anywhere on the hard drive.

Quote:
i copied util.h
That's only used by the examples. The only headers you need are in the
lib subdir.

i got no errors during compiling, but i get
Quote:
a lot of linking errors.
Did you add the MySQL++ library to the list of libraries linked to the
program?

--
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   
Matt Dargavel
 
Posts: n/a

Default RE: Using MySQL++ in Your Own Projects - 10-25-2006 , 08:18 AM






My guess is that you haven't linked against the mysqlpp library. Make sure
mysqlpp.lib is in the "Additional Dependencies" setting under
"Linker->Input", check that the path to the library is included in the
"Additional Library Directories" setting under Linker->General.


Quote:
-----Original Message-----
From: Klemen Dovrtel [mailto:klemen_dovrtel (AT) yahoo (DOT) com]
Sent: 25 October 2006 12:29
To: plusplus (AT) lists (DOT) mysql.com
Subject: Using MySQL++ in Your Own Projects

I compiled the library and the sample1 application and
it works fine. The problem is, that i can't built my
own project...
I read in readme file that i should "Add a .cpp file
to the solution so it _knows_ it's a C/C++
solution."....Which .cpp file is that? I copied the
lib directory to my project, i copied util.h and
change the project setting similar to sample1 project
settings...i got no errors during compiling, but i get
a lot of linking errors. Any idea what is wrong?

I am using winxp sp2, visual studio 2005,
mysql++-2.1.1 and mysql-essential-5.0.26-win32.

Linking...
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: virtual
__thiscall mysqlpp::Connection::~Connection(void)"
(__imp_??1Connection@mysqlpp@@UAE@XZ) referenced in
function _wmain
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char
__thiscall mysqlpp::Query::error(void)"
(__imp_?error@Query@mysqlpp@@QAE?AV?$basic_string@ DU?$char_traits@D@std
@@V?$allocator@D@2@@std@@XZ)
referenced in function _wmain
mysql test2.obj : error LNK2019: unresolved external
symbol "char * __cdecl utf8trans(char const *,char
*,int)" (?utf8trans@@YAPADPBDPADH@Z) referenced in
function _wmain
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: virtual class
mysqlpp::ColData_Tmpl<class mysqlpp::const_string
const __thiscall mysqlpp::Row::at(unsigned int)const "
(__imp_?at@Row@mysqlpp@@UBE?BV?$ColData_Tmpl@Vcons t_string@mysqlpp@@@2@
I@Z)
referenced in function _wmain
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: virtual
__thiscall mysqlpp::Row::~Row(void)"
(__imp_??1Row@mysqlpp@@UAE@XZ) referenced in function
_wmain
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
mysqlpp::Query __thiscall
mysqlpp::Connection::query(void)"
(__imp_?query@Connection@mysqlpp@@QAE?AVQuery@2@XZ )
referenced in function _wmain
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: bool __thiscall
mysqlpp::Connection::connect(char const *,char const
*,char const *,char const *,unsigned int,char,unsigned
int,char const *,unsigned int)"
(__imp_?connect@Connection@mysqlpp@@QAE_NPBD000IDI 0I@Z)
referenced in function _wmain
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: __thiscall
mysqlpp::Connection::Connection(bool)"
(__imp_??0Connection@mysqlpp@@QAE@_N@Z) referenced in
function _wmain
mysql test2.obj : error LNK2001: unresolved external
symbol "public: virtual unsigned int __thiscall
mysqlpp::Row::size(void)const "
(?size@Row@mysqlpp@@UBEIXZ)
mysql test2.obj : error LNK2001: unresolved external
symbol "public: virtual class
mysqlpp::ColData_Tmpl<class mysqlpp::const_string
const __thiscall mysqlpp::Row::at(unsigned int)const "
(?at@Row@mysqlpp@@UBE?BV?$ColData_Tmpl@Vconst_stri ng@mysqlpp@@@2@I@Z)
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: virtual
__thiscall mysqlpp::ResUse::~ResUse(void)"
(__imp_??1ResUse@mysqlpp@@UAE@XZ) referenced in
function "public: virtual __thiscall
mysqlpp::Result::~Result(void)"
(??1Result@mysqlpp@@UAE@XZ)
mysql test2.obj : error LNK2019: unresolved external
symbol _mysql_num_rows@4 referenced in function
"public: unsigned __int64 __thiscall
mysqlpp::Result::num_rows(void)const "
(?num_rows@Result@mysqlpp@@QBE_KXZ)
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: __thiscall
mysqlpp::Row::Row(char * * const &,class
mysqlpp::ResUse const *,unsigned long *,bool)"
(__imp_??0Row@mysqlpp@@QAE@ABQAPADPBVResUse@1@PAK_ N@Z)
referenced in function "public: class mysqlpp::Row
const __thiscall mysqlpp::Result::fetch_row(void)const
" (?fetch_row@Result@mysqlpp@@QBE?BVRow@2@XZ)
mysql test2.obj : error LNK2019: unresolved external
symbol _mysql_fetch_lengths@4 referenced in function
"public: class mysqlpp::Row const __thiscall
mysqlpp::Result::fetch_row(void)const "
(?fetch_row@Result@mysqlpp@@QBE?BVRow@2@XZ)
mysql test2.obj : error LNK2019: unresolved external
symbol _mysql_fetch_row@4 referenced in function
"public: class mysqlpp::Row const __thiscall
mysqlpp::Result::fetch_row(void)const "
(?fetch_row@Result@mysqlpp@@QBE?BVRow@2@XZ)
mysql test2.obj : error LNK2019: unresolved external
symbol _mysql_data_seek@12 referenced in function
"public: void __thiscall
mysqlpp::Result::data_seek(unsigned int)const "
(?data_seek@Result@mysqlpp@@QBEXI@Z)
mysql test2.obj : error LNK2019: unresolved external
symbol "__declspec(dllimport) public: class
mysqlpp::Result __thiscall mysqlpp::Query::store(class
mysqlpp::SQLQueryParms &)"
(__imp_?store@Query@mysqlpp@@QAE?AVResult@2@AAVSQL QueryParms@2@@Z)
referenced in function "public: class mysqlpp::Result
__thiscall mysqlpp::Query::store(void)"
(?store@Query@mysqlpp@@QAE?AVResult@2@XZ)


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=matt@shout-
telecoms.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
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.