-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Comments
I could take a look next week if you like.
It would be OK to add "using namespace std" in problematic cpp files,
just not .h files.
Otherwise qualify instances of min, max etc with std::, ie std::min etc.
…On Sat, Jul 29, 2023 at 01:57:34AM -0700, alxpl wrote:
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?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.*Message ID:
***@***.***>
--
----------------------------------------------------------------------------
Dr Russell Standish Phone 0425 253119 (mobile)
Principal, High Performance Coders ***@***.***
http://www.hpcoders.com.au
----------------------------------------------------------------------------
|
Hello Russell,
On Sat, Jul 29, 2023, 13:29 Russell Standish ***@***.***> wrote:
I could take a look next week if you like.
I will give it a try if I can find some time next week as well, Monday
morning at the earliest.
It would be OK to add "using namespace std" in problematic cpp files,
just not .h files.
Otherwise qualify instances of min, max etc with std::, ie std::min etc.
The latter was what I intended to do, keep specifying the namespaces to
which the functions belong, until the compiler is happy.
I guess I will make an attempt and if I hit a wall, I will bother you again.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
…
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?
The text was updated successfully, but these errors were encountered: