Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 830
    • Issues 830
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 240
    • Merge requests 240
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #17490
Closed
Open
Issue created Jan 23, 2019 by bbercovici@bbercovici

vtkIOImage conflicts with cmath (math.h)

The issue arises when vtkIOImage is listed as a needed component in find_package(VTK COMPONENTS ...). cmake .. works fine, but make will spit out the attached error log suggesting that there is some unwanted interaction with cmath.

Not including cmath allows the compile run to proceed.

Tested on MacOS 10.14.3, with vtk 8.1.2 installed from Homebrew (and just upgraded this morning).

main.cpp:

#include <cmath>
int main(){ 
  return 1; 
}

CMakeLists.txt

cmake_minimum_required(VERSION 3.12) 
project(main CXX) 
find_package(VTK REQUIRED COMPONENTS vtkCommonColor vtkIOImage) 
include(${VTK_USE_FILE}) 
add_executable(main main.cpp) 
target_link_libraries(main PUBLIC ${VTK_LIBRARIES}) 

log.txt

Edited Jan 23, 2019 by bbercovici
Assignee
Assign to
Time tracking