Skip to content

Commit

Permalink
COMP: Fix compile error on MSVC+Ninja by explicitly exporting symbols
Browse files Browse the repository at this point in the history
The error message was:

LINK : fatal error LNK1181: cannot open input file 'D:\a\ITKNornir\ITK-build\lib\itkNornir-5.4.lib'
  • Loading branch information
dzenanz committed Oct 17, 2024
1 parent 0a487fb commit f2ef627
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion include/itkIRCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef itkIRCommon_h
#define itkIRCommon_h

#include "NornirExport.h"

// common:
#include <itkSimpleFilterWatcher.h>
#include <itkImageFileReader.h>
Expand Down Expand Up @@ -150,7 +152,7 @@ mask_so(const mask_t * mask)
// point in BREAK. This is to be used in those cases when you know
// exactly when you want to hit the breakpoint.
//
extern int
Nornir_EXPORT int
BREAK(unsigned int i);

//----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion include/itkIRRefineGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace itk
*
*/
template <typename TInputImage, typename TOutputImage>
class IRRefineGrid : public ImageToImageFilter<TInputImage, TOutputImage>
class ITK_TEMPLATE_EXPORT IRRefineGrid : public ImageToImageFilter<TInputImage, TOutputImage>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(IRRefineGrid);
Expand Down
4 changes: 2 additions & 2 deletions src/itkIRCommon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pthread_attr_t gomp_thread_attr;
//----------------------------------------------------------------
// BREAK
//
int
Nornir_EXPORT int
BREAK(unsigned int i)
{
printf("\n\n\nBREAK BREAK BREAK BREAK BREAK BREAK BREAK: %i\n\n\n\n", i);
Expand Down Expand Up @@ -1596,4 +1596,4 @@ rgb_to_hsv(const xyz_t & RGB)
}

return HSV;
}
}

0 comments on commit f2ef627

Please sign in to comment.