I am following the documentation steps at https://github.com/mapserver/mapserver/wiki/RenderingOsmDataWindows. This is great documentation and everything is clear. However, I am getting the following error when I run make command
to generate the map file.
$ make
cpp -D_debug=1 -D_layerdebug=1 -DOSM_PREFIX=osm_new_ -DOSM_SRID=3857 -DOSM_FORCE_POSTGIS_EXTENT=0 -P -o osm-google.map osmbase.map -DTHEME=google -D_proj_lib=\"C:\Program Files\PostgreSQL\14\share\contrib\postgis-3.2\proj\" -Igenerated
cc1: error: output filename specified twice
make: *** [Makefile:108: osm-google.map] Error 1
As per the instructions in the Makefile, I modified CPP=gcc...
command with CPP=cpp
as it gave another error (gcc: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
). When I set CPP=cpp, I am now getting this error.
The error above says that after -o option with cpp, we should have one filename. But in the command we have ${mapfile} {template} with -o
. The screenshot mentioned in the documentation also shows these two filenames. How can I resolve this issue?
Is this some cpp compiler version issue that is causing it?
Is there any other way to generate the map file manually for osm data present in Postgresql db?