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

Compilation issue #1

Closed
baerbock opened this issue Dec 16, 2019 · 2 comments
Closed

Compilation issue #1

baerbock opened this issue Dec 16, 2019 · 2 comments

Comments

@baerbock
Copy link

Hi Andrew,

I'm getting compilation errors due to missing ceil and floor. My gcc 9.2.0 is quite new; maybe it is wrongly compiling the sources as C++14?

isolation.cpp: In function 'int main(int, char**)':
isolation.cpp:145:24: error: 'floor' was not declared in this scope
  145 |   for (int lat = (int) floor(bounds[0]); lat < (int) ceil(bounds[1]); ++lat) {
      |                        ^~~~~
isolation.cpp:145:54: error: 'ceil' was not declared in this scope; did you mean 'el'?
  145 |   for (int lat = (int) floor(bounds[0]); lat < (int) ceil(bounds[1]); ++lat) {
      |                                                      ^~~~
      |                                                      el

prominence.cpp: In function 'int main(int, char**)':
prominence.cpp:181:18: error: 'floor' was not declared in this scope
  181 |   for (int lat = floor(bounds[0]); lat < ceil(bounds[1]); ++lat) {
      |                  ^~~~~
prominence.cpp:181:42: error: 'ceil' was not declared in this scope; did you mean 'el'?
  181 |   for (int lat = floor(bounds[0]); lat < ceil(bounds[1]); ++lat) {
      |                                          ^~~~
      |                                          el
@akirmse
Copy link
Owner

akirmse commented Dec 17, 2019

Interesting.. the makefile sets -std=c++11 and it built locally on a Mac. I've explicitly included <cmath> now. Let me know if that works. You can also send a PR if you find other build problems.

@baerbock
Copy link
Author

I've had already patched ceil/floor to std::ceil/floor, so probably this works.

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