hlrs-vis / covise

Collaborative Visualization and Simulation Environment, OpenCOVER and OddLOT
http://www.hlrs.de/covise/
186 stars 88 forks source link

Fix compile problem with SWIG 4.1.0 #82

Closed atismer closed 1 year ago

atismer commented 1 year ago

The compilation stops with swig 4.1.0 due to an input error. The swig output (created with option -E) for the file [...]/covise/src/sys/GuiRenderMessage/coGRMsg.i contains e.g.:

[...]
class 1 coGRMsg
[...]

In my opinion, the definition of

https://github.com/hlrs-vis/covise/blob/b0bc83a0ada2ee5ac62f27339b9ec8b993d9c1eb/src/sys/GuiRenderMessage/CMakeLists.txt#L42

has a different behavior in the new version of swig. Changing the line to

SET_SOURCE_FILES_PROPERTIES(${SWIGSOURCE} PROPERTIES SWIG_FLAGS "-DGRMSGEXPORT=''")

compiles fine.

atismer commented 1 year ago

If this is of interest: the compilation without the fix works for swig 3.0.12 and 4.0.1, but as mentioned above not for 4.1.0.

uwewoessner commented 1 year ago

Danke!