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

Build error #16

Open
GamesOpenSource opened this issue Sep 5, 2019 · 2 comments
Open

Build error #16

GamesOpenSource opened this issue Sep 5, 2019 · 2 comments

Comments

@GamesOpenSource
Copy link

Hi, project looks interesting. Can't build on manjaro linux 64bit in Virtualbox:

[ 50%] Linking CXX executable main
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `sdl_die(char const*)':
/home/user/Boat-Racing-Game/platform.cpp:17: undefined reference to `SDL_GetError'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Platform::initialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, bool)':
/home/user/Boat-Racing-Game/platform.cpp:29: undefined reference to `SDL_Init'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:32: undefined reference to `SDL_Quit'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:33: undefined reference to `SDL_GL_LoadLibrary'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:43: undefined reference to `SDL_GL_SetAttribute'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:44: undefined reference to `SDL_GL_SetAttribute'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:48: undefined reference to `SDL_CreateWindow'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:55: undefined reference to `SDL_CreateWindow'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:65: undefined reference to `SDL_GL_CreateContext'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:76: undefined reference to `glewInit'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:79: undefined reference to `glewGetErrorString'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:102: undefined reference to `SDL_GL_SetSwapInterval'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:109: undefined reference to `SDL_GetWindowSize'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Platform::step()':
/home/user/Boat-Racing-Game/platform.cpp:119: undefined reference to `SDL_PollEvent'
/usr/bin/ld: /home/user/Boat-Racing-Game/platform.cpp:126: undefined reference to `SDL_GL_SwapWindow'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `main':
/home/user/Boat-Racing-Game/main.cpp:198: undefined reference to `SDL_GetKeyboardState'
/usr/bin/ld: /home/user/Boat-Racing-Game/main.cpp:447: undefined reference to `SDL_GetMouseState'
/usr/bin/ld: /home/user/Boat-Racing-Game/main.cpp:451: undefined reference to `__glewUseProgram'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Shader::ShaderCode::ShaderCode(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/home/user/Boat-Racing-Game/shader.cpp:24: undefined reference to `__glewCreateShader'
/usr/bin/ld: /home/user/Boat-Racing-Game/shader.cpp:27: undefined reference to `__glewShaderSource'
/usr/bin/ld: /home/user/Boat-Racing-Game/shader.cpp:29: undefined reference to `__glewCompileShader'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Shader::Shader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/home/user/Boat-Racing-Game/shader.cpp:40: undefined reference to `__glewCreateProgram'
/usr/bin/ld: /home/user/Boat-Racing-Game/shader.cpp:42: undefined reference to `__glewAttachShader'
/usr/bin/ld: /home/user/Boat-Racing-Game/shader.cpp:43: undefined reference to `__glewAttachShader'
/usr/bin/ld: /home/user/Boat-Racing-Game/shader.cpp:45: undefined reference to `__glewBindAttribLocation'
/usr/bin/ld: /home/user/Boat-Racing-Game/shader.cpp:47: undefined reference to `__glewLinkProgram'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Shader::activate()':
/home/user/Boat-Racing-Game/shader.cpp:54: undefined reference to `__glewUseProgram'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Shader::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, glm::mat<4, 4, float, (glm::qualifier)0>)':
/home/user/Boat-Racing-Game/shader.cpp:61: undefined reference to `__glewUniformMatrix4fv'
/usr/bin/ld: /home/user/Boat-Racing-Game/shader.cpp:61: undefined reference to `__glewGetUniformLocation'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Shader::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)':
/home/user/Boat-Racing-Game/shader.cpp:70: undefined reference to `__glewUniform1i'
/usr/bin/ld: /home/user/Boat-Racing-Game/shader.cpp:70: undefined reference to `__glewGetUniformLocation'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Texture::Texture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/home/user/Boat-Racing-Game/texture.cpp:38: undefined reference to `__glewGenerateMipmap'
/usr/bin/ld: CMakeFiles/main.dir/main.cpp.o: in function `Texture::activate(unsigned int)':
/home/user/Boat-Racing-Game/texture.cpp:49: undefined reference to `__glewActiveTexture'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/main.dir/build.make:88: main] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
@JayFoxRox
Copy link
Owner

Probably similar bitrot to this: OpenSWE1R/openswe1r#180 (comment)

I don't intend to fix this issue. Consider this project abandoned. I might eventually return to something similar, but I'd probably start fresh; likely using some sort of graphics engine to reduce amount of work.

This project started as a meme and it failed to attract any serious contributors, so it never actually became a serious project.
I did still continue working on artwork locally and also have a local branch which implements the Hitman verlet-integrator for crash physics. However, I did not bother upstreaming it. I have documented this abandoned work in #17.
Note that it also seems to contain changes to CMake, so you might have better success with that.

If anybody backports and improves my changes I'd be fine with merging stuff, but I won't waste much time on support, code-review, or anything else. If anybody wants to take over this project then they should create a new issue about this (but why would they? it's pretty barebones..).

@GamesOpenSource
Copy link
Author

Thank you, applying the small changes from OpenSWE1R/openswe1r@b4486e8 does solve the glew errors but the SDL2 linking errors remain.

Not saying it's likely to happen but picking a license might make it more likely for somebody to do something with this.

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