  | | | Linker error in VC7 with mysql++ and std::string | Linker error in VC7 with mysql++ and std::string 2007-08-03 - By Martin Dommermuth
Back Hi there,
I am loosing it!
I want to write a quite simple app reading data from a special source and dumping it into a MySQL DB. I got mysql++-2.3.2 and mysql-5 (See http://sql-5.ora-code.com).0.45 on Windows XP installed on F:\ (this seems to make problems in some cases)
First I get 2 warnings: exceptions.h(44) : warning C4275: non dll-interface class 'exception' used as base for dll-interface class 'mysqlpp::Exception' const_string.h(89) : warning C4267: 'initializing' : conversion from 'size_t' to 'mysqlpp::const_string::size_type', possible loss of data query.h(129) : warning C4275: non dll-interface class 'std::ios_base' used as base for dll-interface class 'std::basic_ios<_Elem,_Traits>' with [ _Elem=char, _Traits=std::char_traits<char> ] xiosbase(181) : see declaration of 'std::ios_base'
Is this a problem? Some sources on the net say, that VC is a bit hypersensitive here.
My real problem is that as soon as I link against mysql++ and use a std::string I get this linker error:
DB.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>, class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>, class std::allocator<char> > (void)" (__imp_??1?$basic_string@(protected)?$char_traits@(protected)@(protected)@@(protected)?$allocator@(protected)@(protected)@@(protected)@@(protected)@(protected) Z) referenced in function "public: void __thiscall DB::addReadout(double,double,int,int,int)" (?addReadout@(protected)@@(protected)@(protected)) [...] Debug/ubisenseprovider.exe : fatal error LNK1120: 2 unresolved externals
Do I have to tell VC to link against a special lib for std::string? Why does this work when I don't use mysql++? And could anyone enlighten me on the "__declspec(dllimport)" stuff?
Thanks for any tips, I am really becoming desperate here.
Martin
-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=mysql@(protected)
|
|
 |