Discussion:
[vtkusers] missing vtk library for vtk5 compilation
Idayat Salako
2018-10-24 10:57:58 UTC
Permalink
Cmake: v3.12.2-win64-x64
OS: Windows
Visual studio: Community 2017

I am building a program that requires an older version of vtk due to
compatibility issues. I have currently downloaded VTK v5.0.0 from (
https://gitlab.kitware.com/vtk/vtk/tree/v5.0.0) but I get missing library
error (cannot open input file......vtkRendering.lib) when i compile in
visual studio; this is after i have configured/generated in cmake. Any idea
how I might get this library or how to avoid this error to compile vtk 5.0?

[image: image.png]
Thanks in advance for your help.

Thank you
Idayat Salako

***Whoever wakes up in the morning and is safe in his home, in good health
and has enough provision for the day, it is as if he has all the good
things of this world [HadithTirmidhi 2346]***
Idayat Salako
2018-11-02 08:30:46 UTC
Permalink
Still missing library issue after downgrading to visual studio 2013. Any
suggestions on how to fix this please?
Post by Idayat Salako
Cmake: v3.12.2-win64-x64
OS: Windows
Visual studio: Community 2017
I am building a program that requires an older version of vtk due to
compatibility issues. I have currently downloaded VTK v5.0.0 from (
https://gitlab.kitware.com/vtk/vtk/tree/v5.0.0) but I get missing library
error (cannot open input file......vtkRendering.lib) when i compile in
visual studio; this is after i have configured/generated in cmake. Any idea
how I might get this library or how to avoid this error to compile vtk 5.0?
[image: image.png]
Thanks in advance for your help.
Thank you
Idayat Salako
***Whoever wakes up in the morning and is safe in his home, in good health
and has enough provision for the day, it is as if he has all the good
things of this world [HadithTirmidhi 2346]***
David E DeMarle
2018-11-02 11:34:24 UTC
Permalink
Were there any compilation problems of vtk 5.0 itself in vis studio 2013?
vtk5.0 predated vs2013 so it is entirely possible what it is incompatible
without modification. You might have more luck with vtk 5.8 or .10.
Application side changes might be less extensive with them.
Post by Idayat Salako
Still missing library issue after downgrading to visual studio 2013. Any
suggestions on how to fix this please?
Post by Idayat Salako
Cmake: v3.12.2-win64-x64
OS: Windows
Visual studio: Community 2017
I am building a program that requires an older version of vtk due to
compatibility issues. I have currently downloaded VTK v5.0.0 from (
https://gitlab.kitware.com/vtk/vtk/tree/v5.0.0) but I get missing
library error (cannot open input file......vtkRendering.lib) when i compile
in visual studio; this is after i have configured/generated in cmake. Any
idea how I might get this library or how to avoid this error to compile vtk
5.0?
[image: image.png]
Thanks in advance for your help.
Thank you
Idayat Salako
***Whoever wakes up in the morning and is safe in his home, in good
health and has enough provision for the day, it is as if he has all the
good things of this world [HadithTirmidhi 2346]***
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
https://public.kitware.com/mailman/listinfo/vtkusers
Idayat Salako
2018-11-05 08:54:23 UTC
Permalink
Hi David,
Thank you very much for your response.
I downgraded to vtk 5.10 and compiled with visual studio 2013 but I still
get missing library errors and some compiler errors (pic below). I don't
know if it matters that I also had some warning when configuring/genertaing
in cmake (cmake log files). Would you have any idea as to how to solve this?

[image: image.png]

Thank you
Idayat Salako

***Whoever wakes up in the morning and is safe in his home, in good health
and has enough provision for the day, it is as if he has all the good
things of this world [HadithTirmidhi 2346]***
Post by David E DeMarle
Were there any compilation problems of vtk 5.0 itself in vis studio 2013?
vtk5.0 predated vs2013 so it is entirely possible what it is incompatible
without modification. You might have more luck with vtk 5.8 or .10.
Application side changes might be less extensive with them.
Post by Idayat Salako
Still missing library issue after downgrading to visual studio 2013. Any
suggestions on how to fix this please?
Post by Idayat Salako
Cmake: v3.12.2-win64-x64
OS: Windows
Visual studio: Community 2017
I am building a program that requires an older version of vtk due to
compatibility issues. I have currently downloaded VTK v5.0.0 from (
https://gitlab.kitware.com/vtk/vtk/tree/v5.0.0) but I get missing
library error (cannot open input file......vtkRendering.lib) when i compile
in visual studio; this is after i have configured/generated in cmake. Any
idea how I might get this library or how to avoid this error to compile vtk
5.0?
[image: image.png]
Thanks in advance for your help.
Thank you
Idayat Salako
***Whoever wakes up in the morning and is safe in his home, in good
health and has enough provision for the day, it is as if he has all the
good things of this world [HadithTirmidhi 2346]***
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
https://public.kitware.com/mailman/listinfo/vtkusers
Fcs
2018-11-05 11:05:24 UTC
Permalink
Hello Idayat,

By looking at your CMakeErrorLog, your build is trying to find files like
pthread.h and unistd.h, which are header files belonging to of the POSIX
(thread) API. As you are building under Windows with Visual Studio, these
files don't exist, and you need to link to the Win32 API, and not the POSIX
API. This means something is wrong with your build.

Did you use the correct generator with CMake? I personally haven't built
vtk5 under windows, but I expect their CMake setup to correctly deal with
the POSIX/Win32 issue. Have a look here
<https://cmake.org/cmake/help/v3.4/manual/cmake-generators.7.html#visual-studio-generators>
for more information about CMake generators.

It could also be a bug introduced in the specific commit your are trying to
compile. Did you try using an earlier release?

Also, keep in mind that Visual Studio 2013 did not exist when vtk 5.10 was
released, and it might simply not be compatible with that compiler. Would
it be acceptable for your project to use an earlier compiler? If all else
fails, you could try using a toolchain that is guaranteed to be compatible
with vtk 5.

Last but not least, if I remember properly, the earlier versions of vtk 5
where defining macros conflicting with c++11. I don't remember if that was
also the case for the later versions of vtk 5, or if you could disable those
macros in CMake and use their c++11 equivalent, but keep in mind that Visual
Studio 2013 has (some....) c++11 support which might conflict with vtk 5.

Kind regards






--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Idayat Salako
2018-11-06 17:36:52 UTC
Permalink
Hi,
Thanks David and Fcs. The generator/compiler was the issue; VTK 5.10 is
compatible with visual studio 2012.

For anyone interested:
Steps for installing vtk in windows using cmake
1. steps: (https://www.vtk.org/Wiki/VTK/Building/Windows) (or video:

2. generator/compiler appropriate for any particular cmake version: (
https://cmake.org/cmake/help/v3.4/manual/cmake-generators.7.html#visual-studio-generators
)
3. advisable to install visual studio in the order of release (
https://visualstudio.microsoft.com/vs/support/vs2015/installing-multiple-versions-visual-studio-side-side/
)


Thank you
Idayat Salako

***Whoever wakes up in the morning and is safe in his home, in good health
and has enough provision for the day, it is as if he has all the good
things of this world [HadithTirmidhi 2346]***
Post by Fcs
Hello Idayat,
By looking at your CMakeErrorLog, your build is trying to find files like
pthread.h and unistd.h, which are header files belonging to of the POSIX
(thread) API. As you are building under Windows with Visual Studio, these
files don't exist, and you need to link to the Win32 API, and not the POSIX
API. This means something is wrong with your build.
Did you use the correct generator with CMake? I personally haven't built
vtk5 under windows, but I expect their CMake setup to correctly deal with
the POSIX/Win32 issue. Have a look here
<
https://cmake.org/cmake/help/v3.4/manual/cmake-generators.7.html#visual-studio-generators>
for more information about CMake generators.
It could also be a bug introduced in the specific commit your are trying to
compile. Did you try using an earlier release?
Also, keep in mind that Visual Studio 2013 did not exist when vtk 5.10 was
released, and it might simply not be compatible with that compiler. Would
it be acceptable for your project to use an earlier compiler? If all else
fails, you could try using a toolchain that is guaranteed to be compatible
with vtk 5.
Last but not least, if I remember properly, the earlier versions of vtk 5
where defining macros conflicting with c++11. I don't remember if that was
also the case for the later versions of vtk 5, or if you could disable those
macros in CMake and use their c++11 equivalent, but keep in mind that Visual
Studio 2013 has (some....) c++11 support which might conflict with vtk 5.
Kind regards
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
https://public.kitware.com/mailman/listinfo/vtkusers
Loading...