Talk:Complete roguelike tutorial using C++ and libtcod - part 1: setting up

From RogueBasin
Jump to navigation Jump to search

· Click here to add a new message ·

Modernizing the tutorial

Should we update the tutorial to use modern C++ (C++11 and on)? I have some experience with modern C++ and would like to take a crack at it, unless there's a good reason not to go with the modern standards. - Phyrexus, 21-10-2018

Go ahead, I don't know how technically this affects it and aren't competent enough to give you any reasons not to. But one good reason is the entire guide/code will get rechecked by you. The last time that happened was when I was on it and then moved it here from original author's website choice after asking him Joel Pera (talk) 22:15, 21 October 2018 (CEST)

Problems with libtcod

I`m trying to make a roguelike game for Windows OS on C++, and I got a problem with libtcod. I was following this guide, but I got "undefined reference to `__imp__ZN11TCODConsole8initRootEiiPKcb15TCOD_renderer_t'" and simular errors for every line with libtcod functions and code don`t compile. What is wrong?

The same problem. Anyone know how to fix it? S0ZDATEL (talk) 10:52, 27 May 2019 (CEST)
Link errors like this imply that you included the headers correctly but did not link with the libtcod library. It's a common beginner issue with C/C++ projects. --HexDecimal (talk) 00:37, 9 April 2022 (UTC)
It could also mean that the compiler to used to link the library does not match the compiler used to originally compile it. Such as using MSVC to link a MinGW library. --HexDecimal (talk) 16:59, 9 April 2022 (UTC)

Somewhat up to date?

I'm new around these parts so it's unclear to me how up to date this tutorial is.

While following along on my M1/arm64 mac (doubtful it's arch related though), I had to install the SDL sdk via the official SDL website then add an additional `-I/Library/Frameworks/SDL2.framework/Headers` to my Makefile. (Also, why isn't this project teaching / using Make?!)

The tutorial is ancient and doesn't use proper C++11, there are owning raw pointers all over, it uses a faulty and broken version of std::vector (TCODList), it uses a serialization API that breaks across platforms (TCODZip), and it generally uses parts of libtcod that are no longer recommended like libtcod's event system and anything related to its root console. --HexDecimal (talk) 03:02, 2 May 2022 (UTC)