Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
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
Reply:     1     2  

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)