Code Monkey home page Code Monkey logo

Comments (5)

dzenanz avatar dzenanz commented on May 22, 2024

I can reproduce this locally on my computer, but I don't know why the multiple definition is even invoked for this inline constructor of a template class. Adding inline specifier to the constructor does not fix the error.

from itk.

hjmjohnson avatar hjmjohnson commented on May 22, 2024

@dzenanz FYI: All my windows builds are failing at
Error C1083 Cannot open include file: 'itkeigen/Eigen/Eigenvalues': No such file or directory ITKCommon d:\src\itk\modules\core\common\include\itksymmetriceigenanalysis.h 23

I can not even get ITKCommon to build. Sorry, but I won't be able to look at this right away.

As a quick fix, can you move the definition of vnl_matrix()

from the header to .hxx file?

template
vnl_matrix::vnl_matrix () :
num_rows(0),
num_cols(0),
data(nullptr)
{ }

from itk.

hjmjohnson avatar hjmjohnson commented on May 22, 2024

I'm testing this build on mac. So it's not a very good test:

diff --git a/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.h b/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.h
index ab3c7e20a37f..72ea5fb73903 100644
--- a/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.h
+++ b/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.h
@@ -114,12 +114,7 @@ class VNL_EXPORT vnl_matrix
{
public:
//: Default constructor creates an empty matrix of size 0,0.

  • vnl_matrix() :
  • num_rows(0),
  • num_cols(0),
  • data(nullptr)
  • {
  • }
  • vnl_matrix();

    //: Construct a matrix of size r rows by c columns
    // Contents are unspecified.
    diff --git a/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.hxx b/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.hxx
    index 50a57cb7e3ff..e249867454d8 100644
    --- a/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.hxx
    +++ b/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_matrix.hxx
    @@ -133,6 +133,15 @@ do {
    //: Creates a matrix with given number of rows and columns.
    // Elements are not initialized. O(m*n).

+template
+vnl_matrix::vnl_matrix () :

  • num_rows(0),
  • num_cols(0),
  • data(nullptr)
  • {
  • }

template
vnl_matrix::vnl_matrix (unsigned rowz, unsigned colz)
: num_rows(rowz), num_cols(colz)

from itk.

hjmjohnson avatar hjmjohnson commented on May 22, 2024

@dzenanz Would you be able to test this? I can't get any windows builds working. I keep running into a problem related to missing Eigen headers long before I get to your problem.

from itk.

dzenanz avatar dzenanz commented on May 22, 2024

OK I am testing what happens when the constructor's definition is moved from .h into .hxx file.

from itk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.