I just had to add -lvtkGraphics in the end while compiling on matlab -- View this message in context: http://vtk.1045678.n5.nabble.com/Running-a-mex-file-tp5715234p5715242.html Sent from the VTK - Users mailing list archive at Nabble.com.