Skip to content

Commit b7ff3c9

Browse files
author
Koen Deforche
committed
MSVC dll build fixes
1 parent e380c9b commit b7ff3c9

File tree

14 files changed

+74
-59
lines changed

14 files changed

+74
-59
lines changed

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ MACRO(WT_ADD_EXAMPLE name)
2727
ADD_EXECUTABLE(${ARGV})
2828
ENDIF(EXAMPLES_CONNECTOR MATCHES "wtisapi")
2929
IF(MSVC)
30-
SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "/W3 /Wp64")
30+
SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "/W3 /Wp64 /wd4251 /wd4275")
3131
ENDIF(MSVC)
3232
TARGET_LINK_LIBRARIES(${name} ${EXAMPLES_CONNECTOR})
3333
ENDMACRO(WT_ADD_EXAMPLE)

src/Wt/Dbo/DbAction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected:
124124
};
125125

126126
template <class C>
127-
class WTDBO_API LoadDbAction : public LoadBaseAction
127+
class LoadDbAction : public LoadBaseAction
128128
{
129129
public:
130130
LoadDbAction(MetaDbo<C>& dbo, Session::Mapping<C>& mapping,
@@ -175,7 +175,7 @@ protected:
175175
};
176176

177177
template <class C>
178-
class WTDBO_API SaveDbAction : public SaveBaseAction
178+
class SaveDbAction : public SaveBaseAction
179179
{
180180
public:
181181
SaveDbAction(MetaDbo<C>& dbo, Session::Mapping<C>& mapping);

src/Wt/Dbo/ptr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class SaveBaseAction;
2727

2828
namespace Impl {
2929

30-
extern std::size_t ifind(const std::string& s, const std::string& needle);
30+
extern WTDBO_API std::size_t ifind(const std::string& s, const std::string& needle);
3131

3232
struct WTDBO_API ParameterBase {
3333
virtual ~ParameterBase();
@@ -390,7 +390,7 @@ struct DboHelper
390390
* \ingroup dbo
391391
*/
392392
template <class C>
393-
class WTDBO_API Dbo
393+
class Dbo
394394
{
395395
public:
396396
/*! \brief Constructor.

src/Wt/Http/Request

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ class WT_API Request
117117
public:
118118
/*! \brief A single byte range.
119119
*/
120-
class ByteRange
120+
class WT_API ByteRange
121121
{
122122
public:
123+
/*! \brief Creates a (0,0) byteranges */
124+
ByteRange();
125+
123126
/*! \brief Creates a byte range.
124127
*/
125128
ByteRange(::uint64_t first, ::uint64_t last);
@@ -140,7 +143,7 @@ public:
140143
*
141144
* \sa getRanges()
142145
*/
143-
class ByteRangeSpecifier : public std::vector<ByteRange>
146+
class WT_API ByteRangeSpecifier : public std::vector<ByteRange>
144147
{
145148
public:
146149
/*! \brief Creates an empty byte range specifier.

src/Wt/Http/Request.C

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ void UploadedFile::stealSpoolFile() const
6666
fileInfo_->isStolen = true;
6767
}
6868

69+
Request::ByteRange::ByteRange()
70+
: firstByte_(0),
71+
lastByte_(0)
72+
{
73+
}
74+
6975
Request::ByteRange::ByteRange(::uint64_t first, ::uint64_t last)
7076
: firstByte_(first),
7177
lastByte_(last)

src/Wt/SyncLock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace Wt {
5757
* \endcode
5858
*/
5959
template <class Lock>
60-
class WT_API SyncLock : public Lock
60+
class SyncLock : public Lock
6161
{
6262
public:
6363
/*! \brief Creates a RIIA lock.

src/Wt/WBoostAny

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ extern WT_API double asNumber(const boost::any& v);
160160
template <typename Type> void registerType();
161161

162162
namespace Impl {
163-
class AbstractTypeHandler {
163+
class WT_API AbstractTypeHandler {
164164
public:
165165
AbstractTypeHandler();
166166
virtual ~AbstractTypeHandler();
@@ -185,13 +185,13 @@ namespace Impl {
185185
}
186186
};
187187

188-
extern AbstractTypeHandler *getRegisteredType(const std::type_info *type,
188+
extern WT_API AbstractTypeHandler *getRegisteredType(const std::type_info *type,
189189
bool takeLock);
190-
extern void registerType(const std::type_info *type,
190+
extern WT_API void registerType(const std::type_info *type,
191191
AbstractTypeHandler *handler);
192192

193-
extern void lockTypeRegistry();
194-
extern void unlockTypeRegistry();
193+
extern WT_API void lockTypeRegistry();
194+
extern WT_API void unlockTypeRegistry();
195195

196196
extern WT_API bool matchValue(const boost::any& value,
197197
const boost::any& query,

src/Wt/WFlags

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Wt {
2424
* represent the combination of flags.
2525
*/
2626
template<typename EnumType>
27-
class WT_API WFlags
27+
class WFlags
2828
{
2929
class Zero_ {};
3030
typedef Zero_ *Zero;
@@ -333,12 +333,12 @@ WFlags<EnumType> WFlags<EnumType>::operator~() const
333333

334334
#ifndef WT_TARGET_JAVA
335335
#define W_DECLARE_OPERATORS_FOR_FLAGS(EnumType) \
336-
WT_API inline Wt::WFlags<EnumType> operator|(EnumType l, EnumType r) { \
336+
inline Wt::WFlags<EnumType> operator|(EnumType l, EnumType r) { \
337337
Wt::WFlags<EnumType> retval(l); \
338338
retval |= r; \
339339
return retval; \
340340
} \
341-
WT_API inline Wt::WFlags<EnumType> operator|(EnumType l, \
341+
inline Wt::WFlags<EnumType> operator|(EnumType l, \
342342
Wt::WFlags<EnumType> r) { \
343343
return r | l; \
344344
}

src/Wt/WGLWidget

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ typedef std::string JavaScriptMatrix4x4;
2727
// considered as a technology preview, and we welcome comments regarding
2828
// this interface.
2929
// Expect this interface to change.
30-
class WGLWidget: public WInteractWidget
30+
class WT_API WGLWidget: public WInteractWidget
3131
{
3232
public:
3333
WGLWidget(WContainerWidget *parent);

src/Wt/WGenericMatrix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ typedef boost::numeric::ublas::column_major ColumnMajor;
4646
* consider boost ublass, MTL, ...).
4747
*/
4848
template<typename T, std::size_t Rows, std::size_t Cols>
49-
class WT_API WGenericMatrix
49+
class WGenericMatrix
5050
{
5151
typedef boost::numeric::ublas::bounded_matrix<T, Rows, Cols,
5252
boost::numeric::ublas::row_major> MatrixType;

0 commit comments

Comments
 (0)