nickg / lander Goto Github PK
View Code? Open in Web Editor NEWLunar Lander clone using OpenGL
Home Page: http://www.doof.me.uk/lunar-lander/
License: GNU General Public License v3.0
Lunar Lander clone using OpenGL
Home Page: http://www.doof.me.uk/lunar-lander/
License: GNU General Public License v3.0
Hi,
I can't compile the game --- I have this error:
[romano:~/tmp/lander-0.7.2/build] 2s 1 % c++ -Ilander@exe -I. -I.. -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/SDL2 -I/usr/include/libdrm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -O3 '-DGETTEXT_PACKAGE="lander"' -D_REENTRANT -MD -MQ 'lander@exe/src_HighScores.cpp.o' -MF 'lander@exe/src_HighScores.cpp.o.d' -o 'lander@exe/src_HighScores.cpp.o' -c ../src/HighScores.cpp
../src/HighScores.cpp:12:10: fatal error: filesystem: No such file or directory
#include <filesystem>
^~~~~~~~~~~~
compilation terminated.
...it seems the same on Travis CI. Any hints to be able to compile it? Thanks!
(gdb) r
Starting program: /usr/bin/lander
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Lunar Lander 0.7
Copyright (C) 2006-2013 Nick Gasson
This program comes with ABSOLUTELY NO WARRANTY. This is free software, and
you are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
[New Thread 0x7ffff264b700 (LWP 20554)]
OpenGL version: 4.6.0 NVIDIA 415.27
[New Thread 0x7fffe1702700 (LWP 20555)]
Found 0 joysticks
Start level 1:
Dimensions: 2080x1540
Landing pads: 2
Asteroids: 7
Missiles: 0
Gateways: 0
Mines: 0
Thread 1 "lander" received signal SIGSEGV, Segmentation fault.
0x00000000400b3d41 in ?? ()
(gdb) bt
#0 0x00000000400b3d41 in ?? ()
#1 0x00007ffff39ef324 in ?? () from /usr/lib/libnvidia-glcore.so.415.27
#2 0x00007ffff39f59d8 in ?? () from /usr/lib/libnvidia-glcore.so.415.27
#3 0x00007ffff358e0ed in ?? () from /usr/lib/libnvidia-glcore.so.415.27
#4 0x000055555556aeeb in Image::Draw (this=this@entry=0x55555634cd80, x=x@entry=768, y=y@entry=568, rotate=0, scale=scale@entry=1, alpha=alpha@entry=1, white=white@entry=1)
at /home/jose/tarballs/aur4/lander-git/src/lander-git/src/Image.cpp:72
#5 0x000055555556babb in Key::DrawArrow (this=this@entry=0x55555634cd30, viewport=viewport@entry=0x555555b85bb8)
at /home/jose/tarballs/aur4/lander-git/src/lander-git/src/Key.cpp:80
#6 0x0000555555564784 in Game::Display (this=0x555555b85bb0) at /home/jose/tarballs/aur4/lander-git/src/lander-git/src/Game.cpp:708
#7 0x0000555555573baa in ScreenManager::Display (this=<optimized out>) at /home/jose/tarballs/aur4/lander-git/src/lander-git/src/ScreenManager.cpp:97
#8 0x00005555555705eb in OpenGL::DrawGLScene (this=this@entry=0x5555555b4520 <OpenGL::GetInstance()::opengl>)
at /home/jose/tarballs/aur4/lander-git/src/lander-git/src/OpenGL.cpp:307
#9 0x00005555555706b1 in OpenGL::Run (this=0x5555555b4520 <OpenGL::GetInstance()::opengl>) at /home/jose/tarballs/aur4/lander-git/src/lander-git/src/OpenGL.cpp:231
#10 0x000055555556d357 in main (argc=<optimized out>, argv=<optimized out>) at /home/jose/tarballs/aur4/lander-git/src/lander-git/src/Main.cpp:155
i will provide more information about my system if needed.
CXXLD lander
/usr/bin/ld: Main.o: in function `GetConfigDir[abi:cxx11]()':
/usr/include/c++/8.2.1/experimental/bits/fs_path.h:199: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /usr/include/c++/8.2.1/experimental/bits/fs_path.h:298: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /usr/include/c++/8.2.1/experimental/bits/fs_path.h:400: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /usr/include/c++/8.2.1/experimental/bits/fs_path.h:400: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: Main.o: in function `GetConfigDir[abi:cxx11]()':
/home/jose/tmp/lander/src/Main.cpp:228: undefined reference to `std::experimental::filesystem::v1::create_directories(std::experimental::filesystem::v1::__cxx11::path const&)'
/usr/bin/ld: Main.o: in function `GetConfigDir[abi:cxx11]()':
/usr/include/c++/8.2.1/experimental/bits/fs_path.h:199: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /usr/include/c++/8.2.1/experimental/bits/fs_path.h:298: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: Main.o: in function `std::experimental::filesystem::v1::__cxx11::path::_M_append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/c++/8.2.1/experimental/bits/fs_path.h:400: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: Main.o: in function `std::experimental::filesystem::v1::__cxx11::path::path<char [15], std::experimental::filesystem::v1::__cxx11::path>(char const (&) [15])':
/usr/include/c++/8.2.1/experimental/bits/fs_path.h:199: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: Main.o: in function `std::experimental::filesystem::v1::__cxx11::path::path<char [7], std::experimental::filesystem::v1::__cxx11::path>(char const (&) [7])':
/usr/include/c++/8.2.1/experimental/bits/fs_path.h:199: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: Main.o:/usr/include/c++/8.2.1/experimental/bits/fs_path.h:192: more undefined references to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()' follow
/usr/bin/ld: Main.o: in function `main':
/usr/include/c++/8.2.1/experimental/bits/fs_ops.h:127: undefined reference to `std::experimental::filesystem::v1::status(std::experimental::filesystem::v1::__cxx11::path const&)'
/usr/bin/ld: /usr/include/c++/8.2.1/experimental/bits/fs_ops.h:127: undefined reference to `std::experimental::filesystem::v1::status(std::experimental::filesystem::v1::__cxx11::path const&)'
/usr/bin/ld: Main.o: in function `MigrateConfigFiles':
/home/jose/tmp/lander/src/Main.cpp:91: undefined reference to `std::experimental::filesystem::v1::rename(std::experimental::filesystem::v1::__cxx11::path const&, std::experimental::filesystem::v1::__cxx11::path const&)'
/usr/bin/ld: /home/jose/tmp/lander/src/Main.cpp:94: undefined reference to `std::experimental::filesystem::v1::rename(std::experimental::filesystem::v1::__cxx11::path const&, std::experimental::filesystem::v1::__cxx11::path const&)'
/usr/bin/ld: HighScores.o: in function `ScoreFile::Load()':
/usr/include/c++/8.2.1/experimental/bits/fs_path.h:199: undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: HighScores.o: in function `ScoreFile::Load()':
/usr/include/c++/8.2.1/experimental/bits/fs_ops.h:127: undefined reference to `std::experimental::filesystem::v1::status(std::experimental::filesystem::v1::__cxx11::path const&)'
/usr/bin/ld: OpenGL.o: in function `OpenGL::~OpenGL()':
/home/jose/tmp/lander/src/OpenGL.cpp:449: undefined reference to `__glewDeleteProgram'
/usr/bin/ld: OpenGL.o: in function `OpenGL::AddShader(unsigned int, char const*, unsigned int)':
/home/jose/tmp/lander/src/OpenGL.cpp:141: undefined reference to `__glewCreateShader'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:148: undefined reference to `__glewShaderSource'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:150: undefined reference to `__glewCompileShader'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:153: undefined reference to `__glewGetShaderiv'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:160: undefined reference to `__glewAttachShader'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:156: undefined reference to `__glewGetShaderInfoLog'
/usr/bin/ld: OpenGL.o: in function `OpenGL::GetUniformLocation(char const*)':
/home/jose/tmp/lander/src/OpenGL.cpp:200: undefined reference to `__glewGetUniformLocation'
/usr/bin/ld: OpenGL.o: in function `OpenGL::CompileShaders()':
/home/jose/tmp/lander/src/OpenGL.cpp:165: undefined reference to `__glewCreateProgram'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:175: undefined reference to `__glewLinkProgram'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:176: undefined reference to `__glewGetProgramiv'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:182: undefined reference to `__glewValidateProgram'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:183: undefined reference to `__glewGetProgramiv'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:189: undefined reference to `__glewUseProgram'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:185: undefined reference to `__glewGetProgramInfoLog'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:178: undefined reference to `__glewGetProgramInfoLog'
/usr/bin/ld: OpenGL.o: in function `OpenGL::InitGL()':
/home/jose/tmp/lander/src/OpenGL.cpp:472: undefined reference to `glewInit'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:474: undefined reference to `glewGetErrorString'
/usr/bin/ld: OpenGL.o: in function `OpenGL::ResizeGLScene(int, int)':
/home/jose/tmp/lander/src/OpenGL.cpp:502: undefined reference to `__glewUseProgram'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:505: undefined reference to `__glewUniform2f'
/usr/bin/ld: OpenGL.o: in function `OpenGL::Reset()':
/home/jose/tmp/lander/src/OpenGL.cpp:519: undefined reference to `__glewUniform2f'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:524: undefined reference to `__glewUniform1f'
/usr/bin/ld: /home/jose/tmp/lander/src/OpenGL.cpp:529: undefined reference to `__glewUniform4f'
/usr/bin/ld: OpenGL.o: in function `OpenGL::DrawGLScene()':
/home/jose/tmp/lander/src/OpenGL.cpp:304: undefined reference to `__glewUseProgram'
/usr/bin/ld: OpenGL.o: in function `OpenGL::Translate(float, float)':
/home/jose/tmp/lander/src/OpenGL.cpp:519: undefined reference to `__glewUniform2f'
/usr/bin/ld: OpenGL.o: in function `OpenGL::Scale(float)':
/home/jose/tmp/lander/src/OpenGL.cpp:524: undefined reference to `__glewUniform1f'
/usr/bin/ld: OpenGL.o: in function `OpenGL::Colour(float, float, float, float)':
/home/jose/tmp/lander/src/OpenGL.cpp:529: undefined reference to `__glewUniform4f'
/usr/bin/ld: OpenGL.o: in function `OpenGL::Colour(float, float, float)':
/home/jose/tmp/lander/src/OpenGL.cpp:529: undefined reference to `__glewUniform4f'
/usr/bin/ld: Texture.o: in function `Texture::Bind(int)':
/home/jose/tmp/lander/src/Texture.cpp:116: undefined reference to `__glewActiveTexture'
/usr/bin/ld: Image.o: in function `Image::~Image()':
/home/jose/tmp/lander/src/Image.cpp:44: undefined reference to `__glewDeleteBuffers'
/usr/bin/ld: Image.o: in function `Image::~Image()':
/home/jose/tmp/lander/src/Image.cpp:44: undefined reference to `__glewDeleteBuffers'
/usr/bin/ld: Image.o: in function `Image::Image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/jose/tmp/lander/src/Image.cpp:26: undefined reference to `__glewGenBuffers'
/usr/bin/ld: /home/jose/tmp/lander/src/Image.cpp:38: undefined reference to `__glewBindBuffer'
/usr/bin/ld: /home/jose/tmp/lander/src/Image.cpp:39: undefined reference to `__glewBufferData'
/usr/bin/ld: Image.o: in function `Image::Draw(int, int, double, double, double, double) const':
/home/jose/tmp/lander/src/Image.cpp:66: undefined reference to `__glewEnableVertexAttribArray'
/usr/bin/ld: /home/jose/tmp/lander/src/Image.cpp:67: undefined reference to `__glewEnableVertexAttribArray'
/usr/bin/ld: /home/jose/tmp/lander/src/Image.cpp:68: undefined reference to `__glewBindBuffer'
/usr/bin/ld: /home/jose/tmp/lander/src/Image.cpp:69: undefined reference to `__glewVertexAttribPointer'
/usr/bin/ld: /home/jose/tmp/lander/src/Image.cpp:70: undefined reference to `__glewVertexAttribPointer'
/usr/bin/ld: /home/jose/tmp/lander/src/Image.cpp:73: undefined reference to `__glewDisableVertexAttribArray'
/usr/bin/ld: /home/jose/tmp/lander/src/Image.cpp:74: undefined reference to `__glewDisableVertexAttribArray'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:452: lander] Error 1
make[2]: Leaving directory '/home/jose/tmp/lander/src'
make[1]: *** [Makefile:413: all-recursive] Error 1
make[1]: Leaving directory '/home/jose/tmp/lander'
make: *** [Makefile:354: all] Error 2
apparently this is due to glew
which i have installed in multiple versions:
glew 2.1.0-1
glew1.5 1.5.8-5
glew1.6 1.6.0-1
can you please advise?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.