0

while connecting database in cpp I get this error

 1>------ Build started: Project: conn, Configuration: Release Win32         
 1>  test.cpp
 1>LINK : warning LNK4067: ambiguous entry point; selected    'mainCRTStartup'
1>mysqlcppconn-static.lib(mysql_driver.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1700' in test.obj
1>mysqlcppconn-static.lib(mysql_driver.obj) : error LNK2038: mismatch 
1>mysqlcppconn-static.lib(dtoa.obj) : error LNK2001: unresolved external symbol __dtoui3
1>mysqlcppconn-static.lib(timer.obj) : error LNK2001: unresolved external symbol __dtoui3
1>mysqlcppconn-static.lib(dh.obj) : error LNK2001: unresolved external symbol __dtoui3
1>mysqlcppconn-static.lib(libmysql.obj) : error LNK2001: unresolved external symbol __ftol3
1>mysqlcppconn-static.lib(libmysql.obj) : error LNK2001: unresolved external symbol __ftoul3
1>c:\users\pcw\documents\visual studio 2012\Projects\conn\Release\conn.exe : fatal error LNK1120: 7 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I Added dependencies as given on mysql official page but I get this error. I searched over internet but not found such solution...

I am new to cpp.

François Andrieux
  • 28,148
  • 6
  • 56
  • 87
newbee
  • 89
  • 7
  • 1
    ***mysqlcppconn-static.lib(mysql_driver.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1700' in test.obj*** You have a wrong binary version of the library for your compiler. Looks like you are using a `Visual Studio 12 2013` binary with `Visual Studio 11 2012` – drescherjm Jan 06 '17 at 17:45
  • http://stackoverflow.com/questions/19575747/error-lnk2038-mismatch-detected-for-msc-ver-value-1600-doesnt-match-valu – drescherjm Jan 06 '17 at 17:47
  • I changed binaries..but getting `error C2371: 'int8_t' : redefinition; different basic types` – newbee Jan 06 '17 at 18:14
  • 1
    This is a totally different problem than what is in the question. You probably want to ask a new question and post the source code that produces this error with the correct binaries being used. – drescherjm Jan 06 '17 at 18:17
  • I am using the code from [link ](https://dev.mysql.com/doc/connector-cpp/en/connector-cpp-examples-complete-example-1.html) – newbee Jan 06 '17 at 18:21
  • Put that in your new question. – drescherjm Jan 06 '17 at 18:22
  • 1
    Remember StackOverflow is not a forum. It is a place where you ask a single question that you think will be a good question for future readers with the same 1 problem. Also everything needs to be self contained in your 1 question. Links to external code are discouraged. – drescherjm Jan 06 '17 at 18:24

0 Answers0