silverweed / lifish

Remake of the videogame "BOOM" by Factor Software
https://silverweed.github.io/boom
Other
49 stars 6 forks source link

Failed to compile on debian due to "‘debugPainter’ is not a member of ‘lif’" error #15

Open Pippetta87 opened 2 years ago

Pippetta87 commented 2 years ago

Hi, I'm trying to compile it running cmake . && make but I get this error: [97%] Building CXX object CMakeFiles/lifish.dir/src/core/debug/DebugRenderer.cpp.o /home/salvicio/src/lifish/src/core/debug/DebugRenderer.cpp: In lambda function: /home/salvicio/src/lifish/src/core/debug/DebugRenderer.cpp:24:30: error: ‘debugPainter’ is not a member of ‘lif’ 24 | lif::debugPainter->addRectangleAt( | ^~~~~~~~~~~~ /home/salvicio/src/lifish/src/core/debug/DebugRenderer.cpp:34:30: error: ‘debugPainter’ is not a member of ‘lif’ 34 | lif::debugPainter->addTextAt(c->getPosition() + sf::Vector2f(1, 1), ss.str(), 6, | ^~~~~~~~~~~~ /home/salvicio/src/lifish/src/core/debug/DebugRenderer.cpp:37:38: error: ‘debugPainter’ is not a member of ‘lif’ 37 | lif::debugPainter->addTextAt(c->getPosition() + c->getSize() - sf::Vector2f(7, 9), | ^~~~~~~~~~~~ /home/salvicio/src/lifish/src/core/debug/DebugRenderer.cpp: In static member function ‘static void lif::debug::DebugRenderer::drawSHCells(const lif::SHCollisionDetector&)’: /home/salvicio/src/lifish/src/core/debug/DebugRenderer.cpp:53:30: error: ‘debugPainter’ is not a member of ‘lif’ 53 | lif::debugPainter->addRectangleAt( | ^~~~~~~~~~~~ /home/salvicio/src/lifish/src/core/debug/DebugRenderer.cpp:60:14: error: ‘debugPainter’ is not a member of ‘lif’ 60 | lif::debugPainter->addRectangleAt(sf::Vector2f(limit.left, limit.top), | ^~~~~~~~~~~~ make[2]: *** [CMakeFiles/lifish.dir/build.make:1868 : CMakeFiles/lifish.dir/src/core/debug/DebugRenderer.cpp.o] Erreur 1 make[1]: *** [CMakeFiles/Makefile2:83 : CMakeFiles/lifish.dir/all] Erreur 2 make: *** [Makefile:91 : all] Erreur 2 Suggestions?

silverweed commented 2 years ago

Hello, it might be a mistake in the CMakeLists file; do you want to build in debug or release? If you want debug try doing cmake -DRELEASE=0, else cmake -DRELEASE=1 before calling make If that doesn't work in debug, try cmake -DDEBUG=1.

Pippetta87 commented 2 years ago

Hi, with cmake -DDEBUG=1 compiled. Just a side comment: in the binary the score of P2 (the yellow one) isn't zero and at end of levels keeps asking for best score name, while in version compile score of P2 is plain zero.

silverweed commented 2 years ago

Ok, thanks for the feedback. I'll try and fix the cmake problem as soon as I manage and open an issue to keep track of the score issue as well.