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

error: ‘found’ was not declared in this scope #72

Open
dianaleeg opened this issue Aug 14, 2021 · 1 comment
Open

error: ‘found’ was not declared in this scope #72

dianaleeg opened this issue Aug 14, 2021 · 1 comment

Comments

@dianaleeg
Copy link

Hi again!

I feel like I have something wrong with my setup because i keep hitting snags.

error: ‘found’ was not declared in this scope

I get this very strange error tied to this file & line: gui_settings_window.cc:430:3

I checked out the file and it was fine - i did a silly workaround where i initialized EACH 'found' variable i.e. bool found, bool found1, bool found2, etc.

It worked but I don't think I should do this. I feel like it's a symptom of another problem?

GCC is 5.5.0 and C++ is 5.5.0. (I downgraded from 7.5 bc I got an error earlier stating that GCC 6 and above was not supported.)

Follow up


I did this patch and it got past it and then i get this error with the Makefile:

[ 98%] Built target badslam_autogen
**applications/badslam/CMakeFiles/badslam.dir/build.make:127: *** target pattern contains no '%'.  Stop.**
CMakeFiles/Makefile2:863: recipe for target 'applications/badslam/CMakeFiles/badslam.dir/all' failed
make[2]: *** [applications/badslam/CMakeFiles/badslam.dir/all] Error 2
CMakeFiles/Makefile2:875: recipe for target 'applications/badslam/CMakeFiles/badslam.dir/rule' failed

Thank you for all your patience.

@puzzlepaint
Copy link
Collaborator

error: ‘found’ was not declared in this scope

This was an actual issue with the code, sorry for that. It was introduced by a recent change and only occurred in case the K4A library is present, but the Structure SDK is not. This is a combination of settings that I didn't test after making this change. I pushed commit 32e47be to fix this. Unfortunately, at the moment I don't have a system where K4A is installed, so I could not verify that it now compiles in this case, but I believe that it should work. Creating different "found1", "found2", etc. variables as you did should also work.

I currently use an up-to-date Manjaro system, and badslam compiles for me on this system with GCC 9.3.0. Thus, I think that there should in principle be no issue with GCC 6 and above, unless some third-party component on your system imposes this restriction. In particular, CUDA has restrictions on which compiler versions are supported, perhaps you have a very old version of it? In general, I guess that the "versions known to work" stated in the Readme might be outdated for the current state of the code. I should probably change the phrasing there or add a warning that this information might be outdated.

Regarding the error during make, I don't remember having seen this before. As the Makefile is generated by CMake, I think it might be a bug in CMake, as I guess that CMake is not supposed to ever generate an invalid Makefile. Perhaps it could be worth a try to upgrade CMake (in case you aren't using the latest version), or to use CMake's Ninja instead of Makefile generator to try whether this avoids the issue (which seemed to be the case here, where this issue also occurred).

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