Minetestmapper rewritten into C++

Argos
Member
 
Posts: 40
Joined: Tue Mar 04, 2014 21:47

by Argos » Wed Mar 26, 2014 16:52

sfan5 wrote:I have merged some of them for now, I'll some more later.
Thanks for your contribution

Thanks.

Please let me know if there is anything I can contribute to getting them merged swiftly and smoothly.
My mods & tools:
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Sat Apr 26, 2014 11:34

Hello
Are there future plans to add redis backend support?
Thanks,
JPR
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Sat Apr 26, 2014 13:02

JPRuehmann wrote:Are there future plans to add redis backend support?

I already wanted to it yesterday, but here is it:
https://github.com/minetest/minetestmap ... be61c84336
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Sat Apr 26, 2014 20:10

Works
Thanks for the quick Fix.
JPR
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Sun Apr 27, 2014 23:11

Hello
I have a problem with the C minetestmapper
I´ve installed it into /usr/local/bin chown root:root chmod rwx,r-x,r-x.
if I start it from rhe init.lua in the mod Folder theres an normal .png image in the textures Folder.
But if I try to run it from the commandline minetestmapper --backend redis -i (Worldpath) -o (png File) i only get an black image.
what i´m doing wrong?
thanks,
JPR
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Tue Apr 29, 2014 20:16

Thanks now it works from the commandline to.

But a teeny wheeny thing there is in the examples the "" for the colors not there.
without it is not working in the help -h it is described correctly.

Thanks,
JPR
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Tue Apr 29, 2014 20:40

JPRuehmann wrote:But a teeny wheeny thing there is in the examples the "" for the colors not there.
without it is not working in the help -h it is described correctly.

The # not working without a " is the fault of your shell, programs usually do not take this into accout in their help.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Tue Apr 29, 2014 20:45

Sorry I was to fast.
only the first try worked than all tries produced a black File with 1.4kb in Size.
This Command
minetestmapper --geometry -500:-500+1000+1000 --bgcolor '#000000' --backend redis -i /home/minetest/.minetest/worlds/World/ -o ~/Downloads/World-Map.png
Produced this Output on the Commandline.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Unknown nodes:
4seasons:desertsand_winter
4seasons:grass_autumn
4seasons:grass_spring
4seasons:ice_flowing
4seasons:ice_source
4seasons:leaves_autumn
4seasons:leaves_spring
4seasons:sand_winter
bedrock:bedrock
bedrock:glass
beer:beer_grape
beer:beer_hops
bitchange:mineninth_in_ground
default:apple
default:cactus
default:clay
default:desert_sand
default:desert_stone
default:dirt
default:dirt_with_grass
default:dry_shrub
default:grass_1
default:grass_2
default:grass_3
default:grass_4
default:grass_5
default:gravel
default:lava_flowing
default:lava_source
default:leaves
default:nyancat
default:nyancat_rainbow
default:papyrus
default:sand
default:stone
default:stone_with_coal
default:stone_with_copper
default:stone_with_gold
default:stone_with_iron
default:stone_with_mese
default:tree
default:water_flowing
default:water_source
farming:pumpkin
farming_plus:banana
farming_plus:banana_leaves
farming_plus:carrot
farming_plus:cocoa
farming_plus:cocoa_leaves
farming_plus:orange
farming_plus:potato
farming_plus:rhubarb
farming_plus:strawberry
farming_plus:tomato
fire_flowers:fireflower
flowers:dandelion_white
flowers:dandelion_yellow
flowers:geranium
flowers:rose
flowers:tulip
flowers:viola
gloopblocks:stone_mossy
glow:shrooms
glow:stone_with_worms
glowblocks:glowblockwhite_on
moreblocks:super_glow_glass
nature:blossom
smooth:dirt_stone
trail:dirt_with_grass_walked

And resulted in the File
Attachments
World-Map.png
World-Map.png (1.2 KiB) Viewed 6345 times
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Wed Apr 30, 2014 07:48

Make sure your colors.txt file is fine, it seems like the color entries for the nodes are not there.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Wed Apr 30, 2014 08:20

Hello
Sorry I don´t understand what you are talking about.
What is a color.txt File, where must it located and what is its content?
At least where can I get it?
Thanks,
JPR
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Minetestmapper rewritten into C++

by Morn76 » Wed Apr 30, 2014 10:50

JPRuehmann wrote:Hello
Sorry I don´t understand what you are talking about.
What is a color.txt File, where must it located and what is its content?
At least where can I get it?
Thanks,
JPR


https://raw.githubusercontent.com/minet ... colors.txt
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Wed Apr 30, 2014 12:36

Thanks
But where do I put it?
minetestmapper is in /usr/local/bin/
JPR
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Minetestmapper rewritten into C++

by Morn76 » Wed Apr 30, 2014 12:49

I think the mapper always looks for it in your current working directory. I don't really see a way to have it search some global install location. Looks like the install portion of CMakeLists is broken, because colors.txt does not seem to get installed anywhere at all. Cmake is nice for building but terrible for installation. :-(
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Wed Apr 30, 2014 13:15

Aha
Good to know.
That´s a Bug then, I think.
Would be nice to Fix.
Thaks,
JPR
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Minetestmapper rewritten into C++

by Morn76 » Wed Apr 30, 2014 13:21

Maybe this is so you can easily have different colors.txt files in different directories, each tuned for different purposes and installed MT mods. I just clone the minetestmapper repo, do "cmake .; make" and run it from there. No need for a global install really.
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Wed Apr 30, 2014 13:33

That is no Problem in Linux and in Windows as I know to, sincer there is an Hirarchy.
lowest System wide File in /etc /usr/local/etc /usr/share/<programname> or /usr/local/share/<programname>.
next User File in ~/
next Programm specific in specific Programm Folder.
Highest in ./
I think that should be flexible and logical enough, since you can always override by putting a colors.txt in the local Directory.
But always knows that there is an colors .txt thlre.if you ant to use the commano elsewhere.
wTill then,
JPR
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Minetestmapper rewritten into C++

by Morn76 » Wed Apr 30, 2014 15:42

Sure, but you have to implement that in the code: "Search in working directory; if not found look here", etc. It doesn't happen automatically. Just opening "./colors.txt" is far easier.

I'm just surprised that the program does not at least exit with an error message if colors.txt is not found. Generating a completely black image is pretty useless. But as I said, it might simply be that nobody has installed this globally so far, so this problem went unnoticed.

Also, minetestmapper is primarily used by server admins I think, not so much regular MT users, so this might explain why it is less user friendly in that regard.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Wed Apr 30, 2014 15:45

this file needs to be in the directory minetestmapper is run from.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Minetestmapper rewritten into C++

by Morn76 » Wed Apr 30, 2014 15:48

sfan5 wrote:this file needs to be in the directory minetestmapper is run from.


We already know that, the question was why there is no search path to look in global directories too. The cmake installer does not really do a complete install because it only installs the binary.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Wed Apr 30, 2014 15:49

Morn76 wrote:
sfan5 wrote:this file needs to be in the directory minetestmapper is run from.


We already know that, the question was why there is no search path to look in global directories too. The cmake installer does not really do a complete install because it only installs the binary.

I did not notice your post, concerning the colors.txt file: complain to ShadowNinja about that, he wanted to change it.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Thu May 01, 2014 11:42

I will Post on github to maybe I´am not right here.
But for Info.
If got it work now. I´m not completely happy how because of the restrictions. But it works.
first restriction it works only with the colors.txt that is in the github sources, at least I can´t find any other working colors.txt.
second restriction the colors.txt file must be in the same directory as the executable.
third the executable must be started from the Directory in which itsel and the colors.txt is located so you have to cd in the respective folder first.
If you only use it in and from mods that seems OK to me but if you want to use it as standalone command from the Command line it is quite a hazzle.
Thanks,
JPR
 

User avatar
stormchaser3000
Member
 
Posts: 407
Joined: Sun Oct 06, 2013 21:02

Re: Minetestmapper rewritten into C++

by stormchaser3000 » Fri May 02, 2014 05:44

i got a compile error with the version in the top post (i might try sfan5's fork) and i got this

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
CMakeFiles/minetest_mapper.dir/TileGenerator.cpp.o: In function `TileGenerator::writeImage(std::string const&)':
TileGenerator.cpp:(.text+0x22e9): undefined reference to `gdImagePng'
collect2: error: ld returned 1 exit status
make[2]: *** [minetest_mapper] Error 1
make[1]: *** [CMakeFiles/minetest_mapper.dir/all] Error 2
make: *** [all] Error 2


EDIT: nope still the same error in sfan5's fork
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Fri May 02, 2014 12:37

stormchaser3000 wrote:i got a compile error with the version in the top post (i might try sfan5's fork) and i got this

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
CMakeFiles/minetest_mapper.dir/TileGenerator.cpp.o: In function `TileGenerator::writeImage(std::string const&)':
TileGenerator.cpp:(.text+0x22e9): undefined reference to `gdImagePng'
collect2: error: ld returned 1 exit status
make[2]: *** [minetest_mapper] Error 1
make[1]: *** [CMakeFiles/minetest_mapper.dir/all] Error 2
make: *** [all] Error 2

Make sure you have a libgd version with png support installed.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
stormchaser3000
Member
 
Posts: 407
Joined: Sun Oct 06, 2013 21:02

Re: Minetestmapper rewritten into C++

by stormchaser3000 » Sat May 03, 2014 04:03

sfan5 wrote:
stormchaser3000 wrote:i got a compile error with the version in the top post (i might try sfan5's fork) and i got this

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
CMakeFiles/minetest_mapper.dir/TileGenerator.cpp.o: In function `TileGenerator::writeImage(std::string const&)':
TileGenerator.cpp:(.text+0x22e9): undefined reference to `gdImagePng'
collect2: error: ld returned 1 exit status
make[2]: *** [minetest_mapper] Error 1
make[1]: *** [CMakeFiles/minetest_mapper.dir/all] Error 2
make: *** [all] Error 2

Make sure you have a libgd version with png support installed.



png support? i have libgd
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Sat May 03, 2014 06:28

stormchaser3000 wrote:
sfan5 wrote:
stormchaser3000 wrote:i got a compile error with the version in the top post (i might try sfan5's fork) and i got this

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
CMakeFiles/minetest_mapper.dir/TileGenerator.cpp.o: In function `TileGenerator::writeImage(std::string const&)':
TileGenerator.cpp:(.text+0x22e9): undefined reference to `gdImagePng'
collect2: error: ld returned 1 exit status
make[2]: *** [minetest_mapper] Error 1
make[1]: *** [CMakeFiles/minetest_mapper.dir/all] Error 2
make: *** [all] Error 2

Make sure you have a libgd version with png support installed.



png support? i have libgd

Yeah, but your copy of libgd seems to be missing png support.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Minetestmapper rewritten into C++

by Morn76 » Sat May 03, 2014 08:58

stormchaser3000 wrote:png support? i have libgd


Maybe you still have gd 1.x? You need gd 2.0 at least for PNG support I think. Gd 1 only outputs GIF.
 

User avatar
stormchaser3000
Member
 
Posts: 407
Joined: Sun Oct 06, 2013 21:02

Re: Minetestmapper rewritten into C++

by stormchaser3000 » Fri May 16, 2014 00:35

i am using 2.1.0
 

Argos
Member
 
Posts: 40
Joined: Tue Mar 04, 2014 21:47

Re: Minetestmapper rewritten into C++

by Argos » Sat May 24, 2014 19:26

To anyone interested: I have pushed some more changes I made to my version of minetestmapper.

Major features/changes since my previous post:
  • Merged all relevant patches by sfan5 and ShadowNinja (from minetest/minetestmapper)
  • A number of bugs were fixed
  • Alpha transparency merged & adapted / improved so that it works as expected.
  • Redis support merged.
  • Colors.txt is automatically searched for in different locations, and
    can also be specified on the command-line.
  • Colors.txt parsing is fixed & errors are now reported.
  • A grid can be drawn on the map.
  • Geometry is now node-accurate - no more mandatory rounding to map blocks.
    Even a 1x3 map is possible, for example.
    (rounding to block boundaries is also still supported)
  • Database backend to use is determined automatically from world.mt, but can also still be specified manually.
  • Additional points, lines, circles, rectangles or text can be drawn on the map, using world coordinates or map coordinates.
    Transparency is also supported (for circles and ellipses it does not work well though, due to a bug in libgd).
  • Parsing failures of map blocks from the database are now caught and reported; processing continues if
    they are limited in number.
  • Progress indicator

Previous changes & fixes, relative to minetest/minetestmapper:
  • Fixed the options --min-y and --max-y to work correctly
  • Ability to report actual world size and other information (with --verbose)
  • A map of the requested size can be generated (instead of it being reduced
    if the world is smaller).
  • Improved speed

For more detailed information, see the Changelog, or the README file.

Source on github

Examples of some of the features:

Original map, and map with 16x16 grid, aligned to block boundaries (but any grid size is supported):

Image
exampes1.png
exampes1.png (23.27 KiB) Viewed 6336 times


A map with fixed dimensions (empty blocks are not trimmed). Same map with automatic shrinking to eliminate empty blocks (bottom-right), and a version where the map geometry does not follow block boundaries (top-right). Each map with a 16x16 grid to show the block boundaries.

Image
exampes2.png
exampes2.png (15.42 KiB) Viewed 6336 times


A map with translucent water, and a map with additional figures and text, drawn by minetestmapper.

Image
exampes3.png
exampes3.png (160.9 KiB) Viewed 6336 times
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Minetestmapper rewritten into C++

by Inocudom » Sat May 24, 2014 22:13

https://forum.minetest.net/viewtopic.php?f=14&t=6920
Dan Duncombe made this neat program some time before he got banned. If only the same could be done for current minetestmapper programs.
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

Re: Minetestmapper rewritten into C++

by JPRuehmann » Sun May 25, 2014 14:43

Hello that seems super, but if Itry to Compile I get the following errors.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Scanning dependencies of target minetestmapper
[ 11%] Building CXX object CMakeFiles/minetestmapper.dir/PixelAttributes.cpp.o
[ 22%] Building CXX object CMakeFiles/minetestmapper.dir/PlayerAttributes.cpp.o                                                                             
[ 33%] Building CXX object CMakeFiles/minetestmapper.dir/TileGenerator.cpp.o                                                                                 
In file included from /home/ruehmann/minetest-mapper-cpp/TileGenerator.h:28:0,
                 from /home/ruehmann/minetest-mapper-cpp/TileGenerator.cpp:23:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:15:22: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
  int &x = dimension[0];
                      ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:16:22: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
  int &y = dimension[1];
                      ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:17:22: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
  int &z = dimension[2];
                      ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: In constructor ‘BlockPos::BlockPos()’:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:23:15: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  BlockPos() : dimension{0, 0, 0} {}
               ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: In constructor ‘BlockPos::BlockPos(int, int, int)’:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:24:37: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  BlockPos(int _x, int _y, int _z) : dimension{_x, _y, _z} {}
                                     ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: In copy constructor ‘BlockPos::BlockPos(const BlockPos&)’:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:25:34: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  BlockPos(const BlockPos &pos) : dimension{pos.x, pos.y, pos.z} {}
                                  ^
In file included from /home/ruehmann/minetest-mapper-cpp/TileGenerator.h:28:0,
                 from /home/ruehmann/minetest-mapper-cpp/TileGenerator.cpp:23:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: At global scope:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:50:26: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
  bool &xBlock = isBlock[0];
                          ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:51:26: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
  bool &yBlock = isBlock[1];
                          ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:52:26: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
  bool &zBlock = isBlock[2];
                          ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: In constructor ‘NodeCoord::NodeCoord()’:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:54:28: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  NodeCoord() : BlockPos(), isBlock{false, false, false} {}
                            ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: In constructor ‘NodeCoord::NodeCoord(int, int, int)’:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:55:60: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  NodeCoord(int _x, int _y, int _z) : BlockPos(_x, _y, _z), isBlock{false, false, false} {}
                                                            ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: In constructor ‘NodeCoord::NodeCoord(const BlockPos&, bool)’:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:56:69: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  NodeCoord(const BlockPos &pos, bool node = false) : BlockPos(pos), isBlock{pos.x == Any ? false : !node, pos.y == Any ? false : !node, pos.z == Any ? false : !node} {}
                                                                     ^
In file included from /home/ruehmann/minetest-mapper-cpp/TileGenerator.h:28:0,
                 from /home/ruehmann/minetest-mapper-cpp/TileGenerator.cpp:23:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: In copy constructor ‘NodeCoord::NodeCoord(const NodeCoord&)’:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:57:55: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  NodeCoord(const NodeCoord &coord) : BlockPos(coord), isBlock{coord.xBlock, coord.yBlock, coord.zBlock} {}
                                                       ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: In constructor ‘NodeCoord::NodeCoord(int64_t)’:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:58:25: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  NodeCoord(int64_t i) : isBlock{true, true, true} { setFromDBPos(i); }
                         ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h: At global scope:
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:88:9: error: ‘hash’ is not a class template
  struct hash<NodeCoordHashed>
         ^
/home/ruehmann/minetest-mapper-cpp/BlockPos.h:89:2: error: explicit specialization of non-template ‘std::hash’
  {
  ^
make[2]: *** [CMakeFiles/minetestmapper.dir/TileGenerator.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/minetestmapper.dir/all] Fehler 2
make: *** [all] Fehler 2

How can I compile it?

Thanks,
JPR
 

PreviousNext

Return to Minetest-Related

Who is online

Users browsing this forum: No registered users and 44 guests

cron