Comments (6)
Seems everything gets compiled fine, linking fails due to glibc version dependency. So it has nothing to do with tetris-csfml project so I'm closing the issue.
from tetris-csfml.
OK, found it listed in Depencies section in README, will try again next time.
from tetris-csfml.
I gave a next try, still want to add few cents here:
-
Could you mention a command to pull dependencies in Dependencies section?:
git submodule update --init --recursive -
make command will give an error:
src/game.c:38:31: fatal error: SFML/System/Clock.h: No such file or directory
#include <SFML/System/Clock.h> -
Inspecting what's under ./deps/SFML/System you will find that header files are .hpp, not h....
-
Changing src/game.c lines to include .hpp instead of .h doesn't help, looks the Makefile isn't correct:
#include <SFML/System/Clock.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
CC build/game.c.o
src/game.c:38:33: fatal error: SFML/System/Clock.hpp: No such file or directory
#include <SFML/System/Clock.hpp>
from tetris-csfml.
Hello, @r-pankevicius! Thank you for taking an interest in this project!
- Could you mention a command to pull dependencies in Dependencies section?:
git submodule update --init --recursive
Yep, I definitely should mention this in Readme.md
. I will do it.
Tried to play with free LinuxOne
Does it have GPU and any... virtual display? Doesn't look like a machine, that can be used for running tetris. But, anyway, it can theoretically have Xorg installed on it's OS and anything SFML would need for compilation, so let me explain what going wrong here.
- make command will give an error:
src/game.c:38:31: fatal error: SFML/System/Clock.h: No such file or directory
#include <SFML/System/Clock.h>
You don't have CSFML bindings installed on your system. It is expected if you just run make
.
- Inspecting what's under ./deps/SFML/System you will find that header files are .hpp, not h....
They are under ./deps/CSFML/include/SFML
.
I was expecting that if one decided to compile this project from source code, he/she will take a look at .travis.yml
file and it is mentioned under "Compilation and usage" section. I should probably specify compilation commands explicitly in Readme.md
.
If you don't have SFML and CSFML installed in your system then the following huge and complicated command (on bash or zsh) should build tetris
binary with statically linked SFML and CSFML libraries. I Assume that you just cloned repository, changed working directory to cloned one (cd tetris-csfml
), and pulled all submodules with git submodule update --init --recursive
.
PFX=$(pwd)/prefix \
&& mkdir -p $PFX deps/SFML/build deps/CSFML/build \
&& pushd deps/SFML/build \
&& cmake \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX=$PFX \
-DSFML_MISC_INSTALL_PREFIX=$PFX \
-DSFML_DEPENDENCIES_INSTALL_PREFIX=$PFX \
.. \
&& make install \
&& popd \
&& pushd deps/CSFML/build \
&& cmake \
-DBUILD_SHARED_LIBS=OFF \
-DCSFML_LINK_SFML_STATICALLY=TRUE \
-DCMAKE_PREFIX_PATH=$PFX -DCMAKE_INSTALL_PREFIX=$PFX \
.. \
&& make install \
&& popd \
&& make PREFIX=$PFX SFML_STATIC=y
This command will
- Set environment variable
PFX
to$(pwd)/prefix
, where$(pwd)
is absolute path to your current working directory,tetris-sfml
repo clone. - Create
$PFX
(is set to$(pwd)/prefix
),deps/SFML/build
anddeps/CSFML/build
directories for building and installing SFML and CSFML libraries. You also will needcmake
for CSFML and SFML build process. - Build static binary of SFML library in
deps/SFML/build
- Build static binary of CSFML bindings library in
deps/CSFML/build
- Build
tetris
using static SFML and CSFML library binaries.
Further rebuilds may be performed by following command
make PREFIX=$(pwd)/prefix SFML_STATIC=y
If you don't have enthusiasm anymore for taking actions I described above and working on this issue, then let me know or just close the issue.
from tetris-csfml.
@Oxore Vladimir, I have enthusiasm but I have a vacation now. Thanks for your response I will try your recipe later.
from tetris-csfml.
Uh... Found that I need to upgrade CMake
[linux1@prunce tetris-csfml]$ pushd deps/SFML/build \
&& cmake \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DSFML_MISC_INSTALL_PREFIX=$PREFIX \ -DSFML_DEPENDENCIES_INSTALL_PREFIX=$PREFIX \ .. \ && make install \ && popd
~/T/tetris-csfml/deps/SFML/build ~/T/tetris-csfml
CMake Error at CMakeLists.txt:5 (cmake_minimum_required):
CMake 3.0.2 or higher is required. You are running version 2.8.12.2
from tetris-csfml.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tetris-csfml.