Scott wrote:
> I downloaded the source using CVS, and built using VS2008. Everything 
> worked fine. When I try to include soci.h and soci-odbc.h, I get this error:
> 
> Error    2    error C2065: 'x_type' : undeclared identifier    
> c:\development\libraries\c++\soci++\src\core\exchange-traits.h    Line 36
> 
> What's going on? The library built by itself...

Could you paste complete error message?
I'd need to know for what type it is failing - what type is passed
as T to exchange_traits.

For instance, I've found that Visual C++ 9.0 has problems with generatic
exthange_traits specialization for C string:

char const s[] = "Hello const!";
sql << "insert into soci_test(str) values(:s)", use(s);


2>test-postgresql.cpp
2>g:\dev\soci\release\soci-3.0.0\src\core\exchange-traits.h(36) : error 
C2065: 'x_type' : undeclared identifier
2>        g:\dev\soci\release\soci-3.0.0\src\core\use.h(33) : see 
reference to class template instantiation 
'soci::details::exchange_traits<T>' being compiled
2>        with
2>        [
2>            T=const char [10]
2>        ]
2> 
g:\dev\soci\release\soci-3.0.0\src\core\test\common-tests.h(1275) : see 
reference to function template instantiation 
'soci::details::use_type_ptr soci::use<const char[10]>(T (&),const 
std::string &)' being compiled
2>        with
2>        [
2>            T=const char [10]
2>        ]


I've given a quick look at it using SOCI 3.0.0 (not Git repo)
and looks like a bug to me.

Maciej, have you encountered anything like this?

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to