Skip to content

Commit

Permalink
BUG: Fix export for ITKDeprecated classes
Browse files Browse the repository at this point in the history
It was using the export macros from their old `Common` module.

Errors:

```
ITK-build\Modules\Compatibility\Deprecated\src\ITKDeprecated.vcxproj" (default target) (32) ->
         (Link target) ->
    10>itkConditionVariable.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const itk::ConditionVariable::`vftable'" (__imp_??_7ConditionVariable@itk@@6b@) referenced in function "protected: __cdecl itk::ConditionVariable::ConditionVariable(void)" (??0ConditionVariable@itk@@iEAA@XZ) [ITK-build\Modules\Compatibility\Deprecated\src\ITKDeprecated.vcxproj] [ITK.vcxproj]
    10>itkMutexLock.obj : error LNK2001: unresolved external symbol "public: virtual char const * __cdecl itk::SimpleMutexLock::GetNameOfClass(void)" (?GetNameOfClass@SimpleMutexLock@itk@@UEAAPEBDXZ) [ITK-build\Modules\Compatibility\Deprecated\src\ITKDeprecated.vcxproj] [ITK.vcxproj]
    10>itkMutexLock.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const itk::SimpleMutexLock::`vftable'" (__imp_??_7SimpleMutexLock@itk@@6b@) referenced in function "public: __cdecl itk::SimpleMutexLock::SimpleMutexLock(void)" (??0SimpleMutexLock@itk@@qeaa@XZ) [ITK-build\Modules\Compatibility\Deprecated\src\ITKDeprecated.vcxproj] [ITK.vcxproj]
    10>ITK-build\bin\Release\ITKDeprecated-5.0.dll : fatal error LNK1120: 3 unresolved externals [ITK-build\Modules\Compatibility\Deprecated\src\ITKDeprecated.vcxproj] [ITK.vcxproj]

```
Closes InsightSoftwareConsortium#577
  • Loading branch information
phcerdan committed Mar 7, 2019
1 parent baa170a commit f136bfe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace itk
*
* \ingroup ITKDeprecated
*/
class ITKCommon_EXPORT ConditionVariable:public LightObject
class ITKDeprecated_EXPORT ConditionVariable:public LightObject
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(ConditionVariable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace itk
* \ingroup OSSystemObjects
* \ingroup ITKDeprecated
*/
class ITKCommon_EXPORT FastMutexLock:public Object
class ITKDeprecated_EXPORT FastMutexLock:public Object
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(FastMutexLock);
Expand Down
5 changes: 3 additions & 2 deletions Modules/Compatibility/Deprecated/include/itkMutexLock.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "itkObject.h"
#include "itkObjectFactory.h"
#include "itkThreadSupport.h"
#include "ITKDeprecatedExport.h"

namespace itk
{
Expand All @@ -45,7 +46,7 @@ namespace itk
* \ingroup OSSystemObjects
* \ingroup ITKDeprecated
*/
class ITKCommon_EXPORT SimpleMutexLock
class ITKDeprecated_EXPORT SimpleMutexLock
{
public:
/** Standard class type aliases. */
Expand Down Expand Up @@ -99,7 +100,7 @@ class ITKCommon_EXPORT SimpleMutexLock
* \ingroup OSSystemObjects
* \ingroup ITKDeprecated
*/
class ITKCommon_EXPORT MutexLock:public Object
class ITKDeprecated_EXPORT MutexLock:public Object
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(MutexLock);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "itkMacro.h"
#include "itkThreadSupport.h"
#include "ITKDeprecatedExport.h"

namespace itk
{
Expand All @@ -46,7 +47,7 @@ namespace itk
*/

// Critical Section object that is not a itkObject.
class ITKCommon_EXPORT SimpleFastMutexLock
class ITKDeprecated_EXPORT SimpleFastMutexLock
{
public:
/** Standard class type aliases. */
Expand Down

0 comments on commit f136bfe

Please sign in to comment.