List:MySQL++« Previous MessageNext Message »
From:Daniel Date:September 9 2004 11:41pm
Subject:Visual Studio .NET (7.1.3088) and mysql++ 1.7.15
View as plain text  
Hello!
Mysql++ and the examples compiled and are working like expected, but when I
try to create my own project the linking doesn't work correctly. I made a new
blank project outside the mysql++ directory, and copy & pasted the code from
the simple1 example to make sure I didn't do any coding errors.

I have tried to include mysqlclient.lib and mysql++.lib but obviously I don't
know exactly what I am doing and how I should have done it! I would be very
happy if someone could tell me what I am doing wrong and where I set the
environment variables(?) needed to correct it. It seems like mysql++ is really
nice to use, so I would love getting it alive! :)

(Using Visual Studio .NET (7.1.3088) and mysql++ 1.7.15)

Thank you in advance,
/Daniel


Error message when trying to link a project with the same code content as the
example project "simple1":


test error LNK2019: unresolved external symbol "public: __thiscall
MysqlConnection::~MysqlConnection(void)" (??1MysqlConnection@@QAE@XZ)
referenced in function _main
test error LNK2019: unresolved external symbol "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
operator<<(class std::basic_ostream<char,struct std::char_traits<char> >
&,class mysql_ColData<class const_string> const &)"
(??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$mysql_ColData@Vconst_string@@@@@Z)
referenced in function _main
test error LNK2001: unresolved external symbol "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
operator<<(class std::basic_ostream<char,struct std::char_traits<char> >
&,class mysql_ColData<class const_string> const &)"
(??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$mysql_ColData@Vconst_string@@@@@Z)
test error LNK2019: unresolved external symbol "public: __thiscall
MysqlResUse::~MysqlResUse(void)" (??1MysqlResUse@@QAE@XZ) referenced in
function "public: virtual __thiscall MysqlRes::~MysqlRes(void)"
(??1MysqlRes@@UAE@XZ)
test error LNK2001: unresolved external symbol "public: __thiscall
MysqlResUse::~MysqlResUse(void)" (??1MysqlResUse@@QAE@XZ)
test error LNK2019: unresolved external symbol "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __thiscall SQLQuery::str(class SQLQueryParms const
&)const "
(?str@SQLQuery@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVSQLQueryParms@@@Z)
referenced in function "public: class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > __thiscall
MysqlQuery::preview(void)"
(?preview@MysqlQuery@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
test error LNK2001: unresolved external symbol "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __thiscall SQLQuery::str(class SQLQueryParms const
&)const "
(?str@SQLQuery@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVSQLQueryParms@@@Z)
test error LNK2019: unresolved external symbol "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __thiscall SQLQuery::str(class SQLQueryParms const
&,enum query_reset)"
(?str@SQLQuery@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVSQLQueryParms@@W4query_reset@@@Z)
referenced in function "public: class MysqlRes __thiscall
MysqlQuery::store(class SQLQueryParms &,enum query_reset)"
(?store@MysqlQuery@@QAE?AVMysqlRes@@AAVSQLQueryParms@@W4query_reset@@@Z)
test error LNK2019: unresolved external symbol "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > __thiscall SQLQuery::str(class SQLQueryParms const
&,enum query_reset)"
(?str@SQLQuery@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVSQLQueryParms@@W4query_reset@@@Z)
referenced in function "public: virtual class mysql_ColData<class
const_string> const __thiscall MysqlRow::operator[](unsigned int)const "
(??AMysqlRow@@UBE?BV?$mysql_ColData@Vconst_string@@@@I@Z)
test error LNK2019: unresolved external symbol "public: class MysqlRes
__thiscall MysqlConnection::store(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,bool)"
(?store@MysqlConnection@@QAE?AVMysqlRes@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
referenced in function "public: class MysqlRes __thiscall
MysqlConnection::store(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(?store@MysqlConnection@@QAE?AVMysqlRes@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
test error LNK2001: unresolved external symbol "public: class MysqlRes
__thiscall MysqlConnection::store(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,bool)"
(?store@MysqlConnection@@QAE?AVMysqlRes@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
test error LNK2019: unresolved external symbol "private: void __thiscall
MysqlFieldNames::init(class MysqlResUse const *)"
(?init@MysqlFieldNames@@AAEXPBVMysqlResUse@@@Z) referenced in function
"public: __thiscall MysqlFieldNames::MysqlFieldNames(class MysqlResUse const
*)" (??0MysqlFieldNames@@QAE@PBVMysqlResUse@@@Z)
test error LNK2001: unresolved external symbol "private: void __thiscall
MysqlFieldNames::init(class MysqlResUse const *)"
(?init@MysqlFieldNames@@AAEXPBVMysqlResUse@@@Z)
test error LNK2019: unresolved external symbol "private: void __thiscall
FieldTypes::init(class MysqlResUse const *)"
(?init@FieldTypes@@AAEXPBVMysqlResUse@@@Z) referenced in function "public:
__thiscall FieldTypes::FieldTypes(class MysqlResUse const *)"
(??0FieldTypes@@QAE@PBVMysqlResUse@@@Z)
test error LNK2001: unresolved external symbol "private: void __thiscall
FieldTypes::init(class MysqlResUse const *)"
(?init@FieldTypes@@AAEXPBVMysqlResUse@@@Z)
test error LNK2019: unresolved external symbol "public: void __thiscall
SQLQuery::reset(void)" (?reset@SQLQuery@@QAEXXZ) referenced in function "void
__cdecl print_stock_table(class MysqlQuery &)"
(?print_stock_table@@YAXAAVMysqlQuery@@@Z)
test error LNK2019: unresolved external symbol "public: bool __thiscall
MysqlConnection::connect(char const *,char const *,char const *,char const *)"
(?connect@MysqlConnection@@QAE_NPBD000@Z) referenced in function "void __cdecl
connect_sample_db(int,char * * const,class MysqlConnection &,char const *)"
(?connect_sample_db@@YAXHQAPADAAVMysqlConnection@@PBD@Z)
test error LNK2019: unresolved external symbol _connect@12 referenced in
function _my_connect
test error LNK2019: unresolved external symbol _WSAGetLastError@0 referenced
in function _cli_advanced_command
test error LNK2019: unresolved external symbol _WSAGetLastError@0 referenced
in function _vio_peer_addr
test error LNK2001: unresolved external symbol _WSAGetLastError@0
test error LNK2019: unresolved external symbol _htons@4 referenced in function
_mysql_real_connect@32
test error LNK2019: unresolved external symbol _inet_addr@4 referenced in
function _mysql_real_connect@32
test error LNK2019: unresolved external symbol _socket@12 referenced in
function _mysql_real_connect@32
test error LNK2019: unresolved external symbol _ntohs@4 referenced in function
_mysql_server_init@12
test error LNK2001: unresolved external symbol _ntohs@4
test error LNK2019: unresolved external symbol _getservbyname@8 referenced in
function _mysql_server_init@12
test error LNK2019: unresolved external symbol _recv@16 referenced in function
_vio_read
test error LNK2019: unresolved external symbol _send@16 referenced in function
_vio_write
test error LNK2019: unresolved external symbol _setsockopt@20 referenced in
function _vio_keepalive
test error LNK2019: unresolved external symbol _closesocket@4 referenced in
function _vio_close
test error LNK2019: unresolved external symbol _shutdown@8 referenced in
function _vio_close
test error LNK2019: unresolved external symbol _getpeername@12 referenced in
function _vio_peer_addr
test error LNK2019: unresolved external symbol _gethostbyname@4 referenced in
function _my_gethostbyname_r
test error LNK2019: unresolved external symbol _WSACleanup@0 referenced in
function _my_end
test error LNK2019: unresolved external symbol _WSAStartup@8 referenced in
function _win32_init_tcp_ip
test error LNK2019: unresolved external symbol _inet_ntoa@4 referenced in
function _my_inet_ntoa
test error LNK2019: unresolved external symbol _WinMain@16 referenced in
function _WinMainCRTStartup
test fatal error LNK1120: 28 unresolved externals


Thread
Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Daniel10 Sep
  • Re: Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Warren Young10 Sep
    • Re: Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Daniel11 Sep
      • Re: Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Thomas Werth13 Sep
      • Re: Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Warren Young13 Sep
        • Re: Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Daniel13 Sep
          • Re: Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Warren Young13 Sep
            • Re: Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Daniel14 Sep
              • Re: Visual Studio .NET (7.1.3088) and mysql++ 1.7.15Warren Young14 Sep