fritzo / jenn3d

A Toy for Visualizing Coxeter Polytopes
jenn3d.org
Other
40 stars 8 forks source link

"Operator" error when compiling for Mac? #4

Closed echoboom closed 9 years ago

echoboom commented 9 years ago

i commented out linux compile and had it compile for mac instead, but i got an error i wasnt sure how to resolve. took it to my friend who codes (i dont really) and he couldnt figure it out either...

ANY Suggestions you have are appreciated (i'm stuck)

Thanks in Advance!

here's a copy/paste of the End of what the terminal spat out:

todd_coxeter.C:563:35: warning: empty parentheses interpreted as a function declaration [-Wvexing-parse] Logging::IndentBlock block(); ^~ todd_coxeter.C:563:35: note: remove parentheses to declare a variable Logging::IndentBlock block(); ^~ In file included from todd_coxeter.C:20: In file included from ./todd_coxeter.h:23: ./definitions.h:74:33: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup if (m_live) { std::cout << message; } ^ todd_coxeter.C:562:48: note: in instantiation of function template specialization 'Logging::fake_ostream::operator<<<std::1::vector<int, std::1::allocator > >' requested here logger.debug() << "defining faces on " << face |0; ^ ./linalg.h:36:15: note: 'operator<<' should be declared prior to the call site std::ostream& operator<< (std::ostream& os, const std::vector& v); ^ 1 warning and 1 error generated. make: *\ [todd_coxeter.o] Error 1 Julian-Picazas-MacBook-Pro-3:jenn3d-master photosynth$

fritzo commented 9 years ago

Looks like you're compiling with clang, whereas I have only ever compiled with g++. I just pushed some fixes to get compilation to work in clang, but I still get linker errors. Does this latest commit work for you: https://github.com/fritzo/jenn3d/commit/667b2ad04d002acc1d586fb47c9508d5c9d18286 ?