[vtkusers] Lib.obj issue still exists

shekharc Shekhar.Chandra at sci.monash.edu.au
Fri Dec 7 20:54:41 EST 2007


Hi Bob,

You input dependency is a path, VC++ thinks its a file and since it has 
no extension it thinks its a object file. I'm guessing you entered this 
in Project Properties.

If you want to link against VTK, you can add /LIBPATH:"h:\vtk50\lib" 
there or you could add the paths in Tools->Options and under Project and 
Solutions, enter the path in Lib section or finally copy the libraries 
to VC Lib directory.

Then you'll have to link to the libraries in the properties by their 
name (like vtkRendering.lib, note the extension). This is what the 
properties "Additional Dependencies" should contain I think.

Also ensure your VC++ is setup properly using 
<http://msdn2.microsoft.com/en-us/express/aa700755.aspx> otherwise VTK 
apps wont work anyway.

Hope that helps.
Cheers
Shakes

Bob Palank wrote:
> Running VC++ 2005 Express  on XP Pro
>  
> 
> After referencing the vtk50\Include folder I get a clean compile 
> which yields a vtkTest01.obj in the Debug folder.
> The linker creates the .exe and all is well since no code exist within 
> main and no references to the vtk Library have been added.
> 
> No executable vtk code was added - just a set of vtk includes ..... all 
> is well
> 
> -----------------------------------------------------------
> 
> Next, I add a Linker Input dependency for the folder h:\vtk50\lib
> 
> still there is no code main()  - the compile is clean but the Linker 
> indicates
> 
> Linking...
> 
> LINK : fatal error LNK1104: cannot open file 'h:\vtk50\lib.obj'
> 
> Build log was saved at 
> "file://h:\vtk50\Examples\vtkTest01\vtkTest01\Debug\BuildLog.htm"
> 
> Of course there is no lib.obj file.
> 
> So what should I do ?
> 
> Bob
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list