tomassedovic / tcod-rs

Rust bindings for libtcod 1.6.3 (the Doryen library/roguelike toolkit)
Do What The F*ck You Want To Public License
229 stars 45 forks source link

SDL : cannot create window #316

Closed DeliciousBeanSauce closed 3 years ago

DeliciousBeanSauce commented 3 years ago

Hi,

I have followed the tutorial and even copy pasted the code to main.rs. Either way I end up with this error SDL : cannot create window The error comes as soon as i use blit function. put_char works fine.

tomassedovic commented 3 years ago

Greetings @DeliciousBeanSauce!

It's really hard to tell how to fix this with the information provided.

Would you please try/answer (in as much detail as you can) the following?

$ git clone https://github.com/tomassedovic/tcod-rs
$ cd tcod-rs
$ cargo run --example keyboard
$ cargo run --example samples

Unfortunately, this repository is no longer maintained and I can't promise that myself or anyone else will be able to help you.

DeliciousBeanSauce commented 3 years ago

Thank You for the quick reply! I am using Linux. I initially had issues with installing libsdl2-dev so I followed libsdl.org guide

hg clone https://hg.libsdl.org/SDL SDL
cd SDL
mkdir build
cd build
../configure
make
sudo make install

After that i could install libsdl2-dev

I am using 0.15.0 version of tcod-rs

I cannot run either of those examples.

24 bits font.
key color : 0 0 0
24bits greyscale font. converting to 32bits
libtcod 1.6.3
SDL : cannot create window
DeliciousBeanSauce commented 3 years ago

Fixed, downloaded and compiled the latest 2.0.14 version and it works now. Renders the screen perfectly, as do the examples.