[vtkusers] Build VTK with MinGW
ftpronk at engits.com
Wed Sep 12 07:36:38 EDT 2018
I think the problem you are having is that you are trying to mix two
programs compiled with different toolchains. Programs compiled with MinGW
are NOT compatible/linkable with programs compiled with the MSVC toolchain.
If you look at "C:\Windows\System32\opengl32.dll", it depends on MSVCRT.dll
which is the C standard library for Visual C++ (MSVC).
You have two choices:
- Either you stick with MinGW, and you compile all your dependencies with
it (VTK, Qt, python, OpenGL..) so that the linking works
- Or you stick with the MSVC toolchain, and compile all your dependencies
with it (or download them, as the most common libraries are readily
installable with MSVC compatibility), which will allow you to also link to
system libraries / system OpenGL.
>From experience, the second option is by far the easiest, especially if you
start doing funky things..
If you choose to go down the MinGW route (good luck..), the Khronos group
has some instructions on their website for OpenGL support with MinGW:
If you feel adventurous, their is an experimental third option, using the
excellent clang toolchain. Apparently it has (partial?) MSVC compatibility,
which would allow you to compile and link your code with libraries compiled
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers