You want to include libtcod.hpp not libtcod.h, the latter is for C, not C++ and TCODColor is in the C++ version.
TCOD 1.5.1 renamed some functions, so that is why your two listings are crashing. Version 1.5.1 renamed console_set_foreground_color to console_set_default_foreground,console_set_background_color to console_set_default_background, console_set_fore and console_set_back to console_set_char_foreground and console_set_char_background respectively, and console_wait_for_keypress has been replaced with sys_wait_for_event. Also, console_print_left has been replaced by console_print_ex, which has an extra 'alignment' parameter...
python,algorithm,dijkstra,libtcod
I made my own implementation of the A* algorithm for aesthetic walk path generation; which included bridges which were placed only when they could, according to A*, considering an added step count: https://github.com/lillian-lemmer/sshrpg/blob/master/plotbrush/mapgen.py#L622 As you can see, all you need to do is manipulate the A* algorithm is to increase...