I am a C programmer with minimal C++ expertise. I've been trying to download and install the packages from here and here. I run configure and make and for the dsr-pdb, I get a slew or errors such as
../include/dsrpdb/Point.h:69:14: error: 'assert' was not declared in this scope
assert(i < 3);
and for synaps I get
if g++ -DHAVE_CONFIG_H -I. -I. -I../include/synaps -I/usr/include -I../include -O3 -g -O2 -MT Variables.o -MD -MP -MF ".deps/Variables.Tpo" -c -o Variables.o `test -f '../mpol/src/Variables.cpp' || echo './'`../mpol/src/Variables.cpp; \
then mv -f ".deps/Variables.Tpo" ".deps/Variables.Po"; else rm -f ".deps/Variables.Tpo"; exit 1; fi
../mpol/src/Variables.cpp: In member function ‘std::string SYNAPS::Variables::operator[](int)’:
../mpol/src/Variables.cpp:16:25: error: ‘sprintf’ was not declared in this scope
sprintf(str,"%d",i);
These are errors because they didn't #include <cassert> or #include <cstdio> in their source files. I find it strange that two different devs have done this. It made me wonder if there is a compiler option that automatically uses the the appropriate c-header and library files, or maybe they developed in an IDE that lets them get away with it? Or perhaps autoconf or make do something upstream of this?
<cstdio>if you include<iostream>.