Comments (16)
are you on ubuntu? if so,
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-mixer-dev
sudo apt-get install libsdl2-ttf-dev
BTW this is a work in progress, I mean, it's years off being complete I reckon. But hey if you want to try it out, limited as it is, you might want to change the line in src/my_main.h #define ENABLE_INVERTED_GFX as I have the graphics inverted 8) I have poor eyesight, so I work with an inverted desktop - obviously when it is finished I'll turn this flag off
from zorbash.
I'm sorry, I didn't express myself well.
Effectively, I already have SDL2 installed, but on the other hand I also have SDL installed, which is the cause of the problem.
The application fails to recognize the binaries for SDL2 and instead uses the binaries for SDL, hence the error.
from zorbash.
gotch, Andres - time to remove this code in .RUNME I think
Prefer SDL over SDL2 as it seems more common
fix now I hope - and thanks for reporting it!
Bear in mind, like I said, very "in development" - mainly I use this as a C++ self education experience - but I do have hopeful plans this makes it to be an eventually released roguelike (free) with some kind of surface world. Something like ADOM, in my dreams!
from zorbash.
Good day @goblinhack,
Problems with compilation continue to occur:
andres6936@Tierra ~/CLionProjects/Zorbash $ sh RUNME
RUNME: 21: .: Can't open ./scripts/common.sh
Try to compile with the Makefile of the src directory and the error is
andres6936@Tierra ~/CLionProjects/Zorbash $ make -f src/Makefile.base
make: *** No rule to make target '.o/ascii.o', needed by 'zorbash'. Stop.
So I decided to move to the src directory and try again:
andres6936@Tierra ~/CLionProjects/Zorbash $ cd src/
andres6936@Tierra ~/CLionProjects/Zorbash/src $ make -f Makefile.base
cc -c -o .o/ascii.o ascii.cpp
In file included from my_ascii.h:14,
from ascii.cpp:6:
my_tex.h:10:10: fatal error: SDL.h: No such file or directory
10 | #include <SDL.h>
| ^~~~~~~
compilation terminated.
make: *** [Makefile.base:186: .o/ascii.o] Error 1
from zorbash.
Hey Andres - can you do a fresh clone ? as ascii.cpp def exists.
scripts/common.sh was missing - not sure what happened. I just
fixed that there.
As for SDL.h, do you have SDL2 dev installed? SDL1 is too old.
Now that the missing file is there - it should tell you some more
clues
I just did a fresh build there on ubuntu and it's back working (ubuntu 19.04)
So give it another try now
from zorbash.
andres6936@Tierra ~/CLionProjects/Zorbash $ git merge origin/master
....
andres6936@Tierra ~/CLionProjects/Zorbash $ ./RUNME
The important part:
In file included from my_main.h:112,
from my_tile.h:10,
from my_ascii.h:15,
from ascii.cpp:6:
my_sys.h:142:30: error: conflicting declaration ‘typedef long long unsigned int uint64_t’
142 | typedef unsigned long long uint64_t;
| ^~~~~~~~
In file included from my_main.h:112,
from my_tile.h:10,
from my_ascii.h:15,
from ascii_box.cpp:6:
my_sys.h:142:30: error: conflicting declaration ‘typedef long long unsigned int uint64_t’
142 | typedef unsigned long long uint64_t;
| ^~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h:9,
from /usr/include/c++/9/cstdint:41,
from /usr/include/c++/9/bits/char_traits.h:621,
from /usr/include/c++/9/string:40,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from my_ascii.h:11,
from ascii.cpp:6:
/usr/include/stdint.h:55:27: note: previous declaration as ‘typedef long unsigned int uint64_t’
55 | typedef unsigned long int uint64_t;
| ^~~~~~~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h:9,
from /usr/include/c++/9/cstdint:41,
from /usr/include/c++/9/bits/char_traits.h:621,
from /usr/include/c++/9/string:40,
from /usr/include/c++/9/stdexcept:39,
from /usr/include/c++/9/array:39,
from my_ascii.h:11,
from ascii_box.cpp:6:
/usr/include/stdint.h:55:27: note: previous declaration as ‘typedef long unsigned int uint64_t’
55 | typedef unsigned long int uint64_t;
| ^~~~~~~~
make: *** [Makefile:199: .o/ascii.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:199: .o/ascii_box.o] Error 1
zorbash: FATAL ERROR: Build failed
Mail [email protected] for help
zorbash: ERROR: Build failed.
zorbash: ERROR: Could you send ./build.log to [email protected]?
zorbash: ERROR: Or file an issue at https://github.com/goblinhack/zorbash
from zorbash.
As for SDL.h, do you have SDL2 dev installed?
That's what I've been trying to tell you for a while, I've got both of them installed, here are the proofs:
from zorbash.
hmm - thanks - I'll try and fix this tomorrow
from zorbash.
hey can you paste the output from
sdl2-config --cflags
and
sdl2-config --libs
that's what I use for the include path, so odd that it cannot then find it. Also could you paste one of the c++ lines in full so I can see the flags?
from zorbash.
actually I did a quick attempted fix - maybe you have more than one sdl2-config and I should be using the one in
your path
tried to fix the uint issue also
let me know if anything works better -thanks
from zorbash.
andres6936@Tierra ~ $ sdl2-config --cflags
-I/usr/local/include/SDL2 -D_REENTRANT
andres6936@Tierra ~ $ sdl2-config --libs
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,--enable-new-dtags -lSDL2
from zorbash.
it "--cflags" :)
anyway check out last nights fix - if that worked
BTW I looked at your Hale game - looks pretty nice - good to see an overworld game. I plan to add that for Zorbash eventually!
from zorbash.
it "--cflags" :)
I'm sorry, I've already corrected it.
from zorbash.
BTW I looked at your Hale game - looks pretty nice - good to see an overworld game.
Thank very much.
from zorbash.
I think it is still a big problem to build your project, it is very tedious and prone to errors:
Commands:
andres6936@Tierra ~/CLionProjects $ git clone --recursive --depth=1 https://github.com/goblinhack/zorbash.git
andres6936@Tierra ~/CLionProjects/zorbash $ ./RUNME
zorbash: SDL2 config : /usr/local/bin/sdl2-config
zorbash: SDL2 version : 2.0.9
zorbash: SDL2 include path : /usr/local/include/SDL2
zorbash: SDL2 mixer.h : /usr/local/include/SDL2/SDL_mixer.h
zorbash: SDL2 ttf.h : /usr/local/include/SDL2/SDL_ttf.h
zorbash: Default Python : /usr/bin/python
zorbash: Default Python config : /usr/bin/python-config
zorbash: Default Python exec : /usr
zorbash: Default Python include path: /usr/include/python2.7
zorbash: Python3 : /usr/bin/python3
zorbash: Python3 config : /usr/bin/python3-config
zorbash: Python3 exec : /usr
zorbash: Python3 include path : /usr/include/python3.5m
zorbash: Python lib version : 3.5
zorbash: PYTHONVERSION : 3.5
zorbash: PYTHONPATH : /usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-x86_64-linux-gnu:/usr/lib/python3.5/lib-dynload:/home/andres6936/.local/lib/python3.5/site-packages:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages
zorbash: VERSION (game) : 0.0.4
zorbash: Cleaning
g++ -Werror -I/usr/local/include/SDL2 -D_REENTRANT -I/usr/include/python3.5m -I/usr/include/python3.5m -Wno-unused-result -Wsign-compare -g -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -g -Wall -DVERSION="0.0.4" -DPYTHONVERSION="3.5" -g -ggdb3 -O3 -x c++ -Wall -std=c++2a -ffast-math -c -o .o/level_display_deep_water.o level_display_deep_water.cpp
level_display_deep_water.cpp: In member function ‘void Level::display_deep_water(int, uint16_t, uint16_t, uint16_t, uint16_t)’:
level_display_deep_water.cpp:22:9: error: variable ‘fbo_mask4’ set but not used [-Werror=unused-but-set-variable]
22 | int fbo_mask4;
| ^~~~~~~~~
cc1plus: all warnings being treated as errors
make: *** [Makefile:226: .o/level_display_deep_water.o] Error 1
make: *** Waiting for unfinished jobs....
zorbash: FATAL ERROR: Build failed
Mail [email protected] for help
zorbash: ERROR: Build failed.
zorbash: ERROR: Could you send ./build.log to [email protected]?
zorbash: ERROR: Or file an issue at https://github.com/goblinhack/zorbash
from zorbash.
I think I need to just turn off Werror except when building for my own dev - as I build mainly on macos and only every few weeks check linux
from zorbash.
Related Issues (8)
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 zorbash.