vtk and execl

Matthieu mpaindavoine at umassd.edu
Fri Apr 28 14:53:05 EDT 2000


Hello,

I am using vtk with a datafile (On Linux), and it works fine on the
shell: $vtkexecutable vtkdatafile.vtk
(So in the executable, I have a ligne where I assign:
somethingreader->SetFileName(argv[1]);)
Now I am trying to start this from another C program.
After forking, I attempted a call like
execl("path-to-file/vtkexecutable", "path-to-file/vtkdatafile.vtk",
NULL);

Well, in that second case, the program stops and vtkDataReader complains
that it can't find the file (No file specified)

FYI, if I modify the vtkexecutable so that the assignement doesn't
depend on argv[1], but rather explicitely spell out the name of
vtkdatafile.vtk, it works fine again.

I was wondering if someone had seen something like that before?

Thank you,

Matthieu

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list