Overview
Features
Download
Documentation
Community
Add-Ons & Services

Data/ODBC and MySQL Testsuite fail with Visual Studio 2010

Please post support and help requests here.

Data/ODBC and MySQL Testsuite fail with Visual Studio 2010

Postby daniel » 20 Nov 2010, 16:11

I am trying to compile the latest SVN 1.3.7 POCO Source with Visual Studio 2010 Professional on Windows 7 x64. I don't have the SUA Subsystem installed.

When I am using the x64 Cross Compiler, I get all Components compiled, except of MySQL Test Suite and Data/ODBC. Using the regular x64 Compiler will break with error messages I posted in a thread earlier today.

I don't understand why the type conversion stopped working. I get everything compiled fine with the VS 2008 Compilers.

Code: Select all
========== Building Data/ODBC ==========

Microsoft (R) Visual Studio Version 10.0.30319.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: ODBC, Configuration: release_shared x64 ------
1>Build started 20.11.2010 14:44:16.
1>InitializeBuildStatus:
1>  Touching "obj\release_shared\ODBC.unsuccessfulbuild".
1>ClCompile:
1>  Binder.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\utility(163): e
rror C2440: 'initializing' : cannot convert from 'int' to 'const SQLPOINTER '
1>          Conversion from integral type to pointer type requires reinterpret_c
ast, C-style cast or function-style cast
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\utili
ty(247) : see reference to function template instantiation 'std::_Pair_base<_Ty1
,_Ty2>::_Pair_base<_Ty,_Ty>(_Other1 &&,_Other2 &&)' being compiled
1>          with
1>          [
1>              _Ty1=const SQLPOINTER ,
1>              _Ty2=SQLLEN,
1>              _Ty=int,
1>              _Other1=int,
1>              _Other2=int
1>          ]
1>          src\Binder.cpp(126) : see reference to function template instantiati
on 'std::pair<_Ty1,_Ty2>::pair<int,int>(_Other1 &&,_Other2 &&)' being compiled
1>          with
1>          [
1>              _Ty1=const SQLPOINTER ,
1>              _Ty2=SQLLEN,
1>              _Other1=int,
1>              _Other2=int
1>          ]
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\utility(163): e
rror C2439: 'std::_Pair_base<_Ty1,_Ty2>::first' : member could not be initialize
d
1>          with
1>          [
1>              _Ty1=const SQLPOINTER ,
1>              _Ty2=SQLLEN
1>          ]
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\utili
ty(166) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::first'
1>          with
1>          [
1>              _Ty1=const SQLPOINTER ,
1>              _Ty2=SQLLEN
1>          ]
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.73
2>------ Build started: Project: TestSuite, Configuration: release_shared x64 --
----
2>Build started 20.11.2010 14:44:18.
2>InitializeBuildStatus:
2>  Touching "obj\release_shared\TestSuite.unsuccessfulbuild".
2>ClCompile:
2>  SQLExecutor.cpp
2>src\SQLExecutor.cpp(358): warning C4244: '=' : conversion from 'SQLULEN' to 'S
QLINTEGER', possible loss of data
2>src\SQLExecutor.cpp(483): warning C4244: 'initializing' : conversion from 'SQL
LEN' to 'SQLINTEGER', possible loss of data
2>src\SQLExecutor.cpp(491): warning C4244: '+=' : conversion from 'SQLLEN' to 'S
QLINTEGER', possible loss of data
2>src\SQLExecutor.cpp(497): warning C4244: '=' : conversion from 'SQLLEN' to 'SQ
LINTEGER', possible loss of data
2>src\SQLExecutor.cpp(505): warning C4244: '+=' : conversion from 'SQLLEN' to 'S
QLINTEGER', possible loss of data
2>src\SQLExecutor.cpp(511): warning C4244: '=' : conversion from 'SQLLEN' to 'SQ
LINTEGER', possible loss of data
2>src\SQLExecutor.cpp(519): warning C4244: '+=' : conversion from 'SQLLEN' to 'S
QLINTEGER', possible loss of data
2>src\SQLExecutor.cpp(1752): error C2440: 'initializing' : cannot convert from '
Poco::DynamicAny' to 'std::basic_string<_Elem,_Traits,_Ax>'
2>          with
2>          [
2>              _Elem=char,
2>              _Traits=std::char_traits<char>,
2>              _Ax=std::allocator<char>
2>          ]
2>          No constructor could take the source type, or constructor overload r
esolution was ambiguous
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:06.13
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

========== Building Data/MySQL ==========

Microsoft (R) Visual Studio Version 10.0.30319.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: TestSuite, Configuration: release_shared x64 --
----
1>Build started 20.11.2010 14:44:27.
1>InitializeBuildStatus:
1>  Touching "obj\release_shared\TestSuite.unsuccessfulbuild".
1>ClCompile:
1>  SQLExecutor.cpp
1>src\SQLExecutor.cpp(1408): error C2440: 'initializing' : cannot convert from '
Poco::DynamicAny' to 'std::basic_string<_Elem,_Traits,_Ax>'
1>          with
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Ax=std::allocator<char>
1>          ]
1>          No constructor could take the source type, or constructor overload r
esolution was ambiguous
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.32
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


I am not the only one having this problem. See:

http://pocoproject.org/forum/viewtopic.php?f=7&t=2719&p=4585&hilit=c2440#p4585
daniel
 
Posts: 5
Joined: 19 Nov 2010, 23:46

Re: Data/ODBC and MySQL Testsuite fail with Visual Studio 20

Postby guenter » 23 Nov 2010, 09:05

Try opening the project files directly in Visual Studio and compile from there instead of using the build script.
guenter
 
Posts: 1138
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Data/ODBC and MySQL Testsuite fail with Visual Studio 20

Postby daniel » 23 Nov 2010, 09:51

That is what I have done first.

But it displays the same error message.
daniel
 
Posts: 5
Joined: 19 Nov 2010, 23:46


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest