Project

General

Profile

Actions

Bug #508

closed

Wt/Dbo/Type, Wt/Dbo/Impl newest bugs in 2010.09.10 git

Added by DQ Qin over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
09/11/2010
Due date:
% Done:

0%

Estimated time:

Description

see these code in :

 #ifndef _MSC_VER
 #ifndef __SUNPRO_C

    ...

 #else
 #  define DBO_EXTERN_TEMPLATES(C)
 #  include <Wt/Dbo/Impl>
 #endif
 #endif

the _MSC_VER branch not define DBO_EXTERN_TEMPLATES as empty

so, DBO_EXTERN_TEMPLATES© will work in source file.

it makes examples/blog/model/Post.h a compiling error in MSVC:

error C4430 ...

it maybe :

#if !defined(_MSC_VER) && !defined(__SUNPRO_C)
#define DBO_EXTERN_TEMPLATES(C)                     \
  extern template class Wt::Dbo::ptr<C>;                \
  extern template class Wt::Dbo::Dbo<C>;                \
  extern template class Wt::Dbo::MetaDbo<C>;                \
  extern template class Wt::Dbo::collection< Wt::Dbo::ptr<C> >;     \
  extern template class Wt::Dbo::Query< Wt::Dbo::ptr<C>,        \
                    Wt::Dbo::DynamicBinding >;  \
  extern template class Wt::Dbo::Query< Wt::Dbo::ptr<C>,        \
                    Wt::Dbo::DirectBinding >;   \
  extern template Wt::Dbo::ptr<C> Wt::Dbo::Session::add<C>(ptr<C>&);    \
  extern template Wt::Dbo::ptr<C> Wt::Dbo::Session::add<C>(C *);    \
  extern template Wt::Dbo::ptr<C> Wt::Dbo::Session::load<C>     \
    (const dbo_traits<C>::IdType&);                 \
  extern template void Wt::Dbo::Session::mapClass<C>(const char *); \
  extern template struct Wt::Dbo::Session::Mapping<C>;          \
  extern template Wt::Dbo::Query< Wt::Dbo::ptr<C>,          \
                  Wt::Dbo::DynamicBinding>      \
    Wt::Dbo::Session::find<C, Wt::Dbo::DynamicBinding>      \
    (const std::string&);                       \
  extern template Wt::Dbo::Query< Wt::Dbo::ptr<C>,          \
                  Wt::Dbo::DirectBinding>       \
    Wt::Dbo::Session::find<C, Wt::Dbo::DirectBinding>       \
    (const std::string&);

#else
// Broken on MSVC 2005 and 2008 (cannot redeclare extern declared template
// methods to be defined after all)
// Broken on SUN StudioExpress
#  define DBO_EXTERN_TEMPLATES(C)
#  include <Wt/Dbo/Impl>
#endif

Wt/Dbo/Impl is the same error.

Actions #1

Updated by Marvin K over 13 years ago

When using MSVC remove or comment our the

#ifndef _MSC_VER

#ifndef __SUNPRO_C

and the #endif parts

Works for me

Actions #2

Updated by Koen Deforche over 13 years ago

  • Status changed from New to Resolved

Fixed in public git, and sneaked into 3.1.5 release.

Actions #3

Updated by Koen Deforche over 13 years ago

  • Status changed from Resolved to Closed

Fixed in Wt 3.1.5

Actions

Also available in: Atom PDF