Skip to content

Compilation on Ubuntu 24

The compilation of Dartflo on Ubuntu 24.04, whose official Swig version is 4.2 in the package manager, produces the following error. According to this thread, it seems to occur when using %import on a file that has a %template instantiation of a std::map. This may be corrected in a future release of Swig.

dartwPYTHON_wrap.cxx:5393:56: error: expected template-name before ‘<’ token
 5393 |     struct SwigPyMapIterator_T : SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper>
      |                                                        ^
dartwPYTHON_wrap.cxx:5393:56: error: expected ‘{’ before ‘<’ token
make[2]: *** [dart/_src/CMakeFiles/dartw.dir/build.make:76: dart/_src/CMakeFiles/dartw.dir/__/__/bin/dartwPYTHON_wrap.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:646: dart/_src/CMakeFiles/dartw.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Edited by Lacroix Martin