Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SciDAVis cannot be built with liborigin 3.0.2 #30

Closed
alxpl opened this issue Jul 29, 2023 · 2 comments
Closed

SciDAVis cannot be built with liborigin 3.0.2 #30

alxpl opened this issue Jul 29, 2023 · 2 comments

Comments

@alxpl
Copy link
Contributor

alxpl commented Jul 29, 2023

Hello,

A while back, this commit was added to liborigin, which removed the "using namespace std" statement from various header files.
Because of that, trying to compile SciDAVis using the latest version of liborigin results in a bunch of errors, due to how functions are declared in importOPJ.cpp:

/builddir/build/BUILD/scidavis-2.9.0/libscidavis/src/importOPJ.cpp: In member function 'bool ImportOPJ::importSpreadsheet(const OriginFile&, const Origin::SpreadSheet&)':
/builddir/build/BUILD/scidavis-2.9.0/libscidavis/src/importOPJ.cpp:326:33: error: 'min' was not declared in this scope; did you mean 'std::min'?
  326 |             for (int i = 0; i < min((int)column.data.size(), maxrows); ++i) {
      |                                 ^~~
      |                                 std::min
In file included from /usr/include/c++/13/algorithm:61,
                 from /usr/include/qt5/QtCore/qglobal.h:142,
                 from /usr/include/qt5/QtGui/qtguiglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qmainwindow.h:43,
                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
                 from /builddir/build/BUILD/scidavis-2.9.0/libscidavis/src/ApplicationWindow.h:34,
                 from /builddir/build/BUILD/scidavis-2.9.0/libscidavis/src/importOPJ.h:34,
                 from /builddir/build/BUILD/scidavis-2.9.0/libscidavis/src/importOPJ.cpp:32:
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: 'std::min' declared here
 5785 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/builddir/build/BUILD/scidavis-2.9.0/libscidavis/src/importOPJ.cpp:382:33: error: 'min' was not declared in this scope; did you mean 'std::min'?
  382 |             for (int i = 0; i < min((int)column.data.size(), maxrows); ++i)
      |                                 ^~~
      |                                 std::min
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: 'std::min' declared here
 5785 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/builddir/build/BUILD/scidavis-2.9.0/libscidavis/src/importOPJ.cpp:426:33: error: 'min' was not declared in this scope; did you mean 'std::min'?
  426 |             for (int i = 0; i < min((int)column.data.size(), maxrows); ++i)
      |                                 ^~~
      |                                 std::min


etc.

Now, this looks trivial and I could try putting a patch together, but my experience with C++ is next to zero and I don't know if you'd prefer typedefs, full function declarations or something else. Would anyone be willing to take a stab at it?

@highperformancecoder
Copy link
Member

highperformancecoder commented Jul 29, 2023 via email

@alxpl
Copy link
Contributor Author

alxpl commented Jul 29, 2023 via email

alxpl added a commit that referenced this issue Aug 1, 2023
This should take care of issue [#30](#30).
@alxpl alxpl closed this as completed Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants