Home › Forum › SOFA › Building SOFA › [SOLVED] Unable to link Qt5 dlls: could not find Qt plugin platform "windows"
- This topic has 24 replies, 3 voices, and was last updated 8 years, 9 months ago by Michel.
-
AuthorPosts
-
5 February 2016 at 20:34 #5598MichelBlocked
Dear SOFA users,
I am trying to build a recent version of SOFA on Windows (has to be Windows for Omni drivers), with Qt5 (I don’t think that the latest accommodates Qt4, since CMake works better with Qt5). I am unable to link with Qt dlls successfully: I get… could not find Qt plugin platform “windows”.
My Qt.conf, which I put in the bin/Debug directory next to Runsofa, is the following:
[Paths]
Plugins=C:/Users/Michel/sofa2015BuildVS2012Qt5/bin/Debug/pluginsI’ve also tried
[Paths]
Plugins=.\pluginsCan someone direct on how to proceed?
Thanks for your support. Michel
8 February 2016 at 11:03 #5605HugoKeymasterDear Michel,
This is really a Qt issue.
How did you get Qt5 ? did you download the Qt binaries or did you compile Qt5 yourself ?
Something might have gone wrong in the process.Cheers,
Hugo
8 February 2016 at 13:35 #5607MichelBlockedHi Hugo,
I downloaded it from the Qt website. I have tried both the 5.4 and the 5.5 binaries. This is on a Windows 7 machine.
I’m open to suggestions. Cheers,
Michel
8 February 2016 at 17:21 #5610GuillaumeKeymasterHi Michel,
I already encountered this problem and fixed it by pasting the Windows binary dependencies in the bin/ folder of my build.
You can find them on the Download page.
Direct link to the zip file : https://gforge.inria.fr/frs/download.php/file/35423/Sofa-15.12.0-win32_external_dependencies.zipHope this helps,
Guillaume.13 February 2016 at 18:31 #5673MichelBlockedHi Guillaume,
thanks for the tip. I noticed that this zip file does not have the binaries needed for the CMake file, such as qmake, so I downloaded the Qt source tree suggested by the SOFA website: qt-everywhere-opensource-src-5.5.1 . I used the VS2012 Command prompt to configure and nmake the source, which produced suitable qmake and Qt5_dir.
I have tried to build SOFA since then, using the tame Glew, Png, Zlib, and other dependencies I had before, which were in the sofa-dependencies-msvc2010-win32-20121011
(note that this is MS VS 2010, not 2012), but I’m seeing errors like the following:
Error 480 error C2365: ‘__glewActiveTexture’ : redefinition; previous definition was ‘data variable’ (C:\Users\Michel\sofa2015\applications\sofa\gui\qt\viewer\qgl\QtGLViewer.cpp) C:\Users\Michel\qt-everywhere-opensource-src-5.5.1\qtbase\include\QtANGLE\GLES2\gl2.h 473 1 SofaGuiQt
…
Error 152 error C2371: ‘GLsizeiptr’ : redefinition; different basic types (viewer\qt\moc_QtViewer.cpp) C:\Users\Michel\qt-everywhere-opensource-src-5.5.1\qtbase\include\QtANGLE\GLES2\gl2.h 39 1 SofaGuiQtI’m assuming that I need to update these other libraries somehow?
Any advice?
13 February 2016 at 18:46 #5674MichelBlockedHi again,
just noticed that you have these things in your new Windows Binaries. Sofa-15.12.0-win32. I will give it a try.
Michel
15 February 2016 at 10:05 #5675GuillaumeKeymasterSorry but I’m not sure I understood well your problem.
Did the
could not find Qt plugin platform “windows”
error appear on building time or on executing time ?My related problem was happening on executing time so the bin/ solution may be innapropriate 🙁
Regards,
Guillaume.15 February 2016 at 22:33 #5681MichelBlockedHi Guillaume,
my problem was during execution also, but to fix it, I’m being instructed to use the libraries at the download page, but this solution is not complete.
Yes, the download page has Qt dlls as well as Boost dlls, but the CMake interface for SOFA also requires us to give it paths to qmake and to Qt5_Dir, the latter of which is the path to Qt5Config.cmake.
So when the SOFA support group tell us to use the following Qt, qt-everywhere-opensource-src-5.5.1 , which is source code that we have to compile ourselves, rather than binaries as was the case in the past, while also providing us with Boost and Qt dlls, this is an incomplete support for the MS Windows community that uses SOFA. Moreover, CMake Boost interface also requires various boost path definitions, including an include path, there are a number of loose ends here. Not surprisingly, I now have compilation problems that I did not have previously.
In summary, the dependencies provided to the Windows development community are only a small subset of those required to CMakify SOFA on Windows (moreover, I have to work on windows to work with an Omni, so I’m in a tough position…). These dependencies need to be reviewed for completeness.
Thanks for your kind support.
Michel
16 February 2016 at 10:53 #5684HugoKeymasterDear Michel,
As mentioned by Guillaume in your other topic, improving the documentation is one of the wide tasks of the Consortium. However, any help and support of the community (feedback) is always appreciated.
About Qt, you can use both Qt4 or Qt5. Both are currently supported.
The Consortium just started two months ago, and we do our best to bring a cross-platform support. Unfortunately, only few developers in the SOFA community are working with Windows, which explains this “incomplete support for the MS Windows community”. In case you need a specific support for Windows, do not hesitate to subscribe a support service to the Consortium. We would be delighted to assist you closely.
Best regards,
Hugo
16 February 2016 at 13:55 #5699GuillaumeKeymasterLet’s clarify things up !
0. You install Visual Studio, Qt5 and CMake on your computer.
1. You download SOFA 15.12 sources withgit clone -b v15.12 git://scm.gforge.inria.fr/sofa/sofa.git
.
2. You put the Windows dependencies in your new SOFA directory (it adds lib/ includes/ and licences/ folders to your SOFA sources).
3. You configure/generate SOFA in 32bit-Release with CMake-GUI.
4. You compile SOFA.
5. You put the dependencies for Win32 binaries in the bin/ folder of your new SOFA build directory.There is no need to compile qt-everywhere-opensource at all.
Please tell me if every step is OK for you.
Regards,
Guillaume.16 February 2016 at 16:24 #5755MichelBlockedDear Guillaume and Hugo,
first off, my apologies for the terseness of the tone of my post; there is a reason that I am a professor and not a diplomat. Still, I owe you an apology.
Second, I appreciate your good faith and generous reply. I will try it from scratch based on the latter set of instructions, and report back. I will assume that some of the CMake resources are not important compared to includes and libraries.
Third, I am open to pitching in with the SOFA community in any way that I can reconcile with my schedule. Right now this schedule is hectic because of a tough teaching load and pressure to crank out successful proposals with my tenure process culminating this summer. I am planning to work on a textbook with Christian Duriez, but had to postpone that since the tenure reviewers don’t give it enough weight, in relation to getting money (the US academic system is like this…). I will also report back with details on any build or runtime bug that I see.
I will be in touch.
Michel
17 February 2016 at 19:51 #5815MichelBlockedFor the time being, I’m seeing odd compilation errors with
SVDBase build problems.
Error 24 error C2039: ‘compute’ : is not a member of ‘Eigen::JacobiSVD’ (C:\Users\Michel\sofa2015\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa2015buildvs2012qt4\include\eigen\src\SVD\JacobiSVD.h 640 1 SofaBaseTopologyThis was not the Git version though, but from a zip file if I recall. I will retry with the latest Git version.
17 February 2016 at 20:11 #5816MichelBlockedAlso, glut.h is missing in the windows dependencies.
There is something called glut.h_proute
I am seeing…
Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
during configure.Same thing with the library. Trying to rename them glut.h and glut32.lib
17 February 2016 at 21:30 #5817MichelBlockedAfter correcting Glut .h and .lib and recompling, with various approaches: MS VS 2010 as well as 2012, and with Qt 4.8.6 and Qt 5.5, I’m always seeing these build errors…
Error 67 error C2039: ‘compute’ : is not a member of ‘Eigen::JacobiSVD’ (C:\Users\Michel\sofa\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa2015buildvs2012qt5\include\eigen\src\SVD\JacobiSVD.h 640 1 SofaBaseTopology
Error 62 error C2059: syntax error : ‘<‘ (C:\Users\Michel\sofa\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa2015buildvs2012qt5\include\eigen\src\SVD\JacobiSVD.h 639 1 SofaBaseTopology
Error 63 error C2065: ‘MatrixType’ : undeclared identifier (C:\Users\Michel\sofa\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa2015buildvs2012qt5\include\eigen\src\SVD\JacobiSVD.h 640 1 SofaBaseTopology
Error 64 error C2065: ‘QRPreconditioner’ : undeclared identifier (C:\Users\Michel\sofa\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa2015buildvs2012qt5\include\eigen\src\SVD\JacobiSVD.h 640 1 SofaBaseTopologywhich undermines SofaBaseTopology and probably anything else that builds on it.
Trying to find this in your forum…
I’m assuming that the source tree and build tree should be separate, right?
17 February 2016 at 22:52 #5818MichelBlockedLast question about this… Where is SVDBase defined for JacobiSVD.h? I don’t understand how it could ever have compiled. Even if I predeclar SVDBase as a class, which eliminates some error messages, it needs a header include to tell it where to find the SVDBase info, no?
18 February 2016 at 10:48 #5823HugoKeymasterDear Michel,
First, it’s hard to debug it without the full tracing of the error (from where the error is exactly generated: which line of which file).
Moreover, this is a quite astonishing error, especially since it’s related on Eigen. Did you follow step by step the documentation ? (we updated two days ago, after your report)
Best regards,
Hugo
18 February 2016 at 22:01 #5839MichelBlockedHi Hugo,
just noticed that page. I will retry and report back using those binaries and the directory structure suggested.
Warm wishes,
Michel
19 February 2016 at 20:37 #5850MichelBlockedHi,
I followed your build instructions to the letter. And I am still seeing this build error.
Error 55 error C2238: unexpected token(s) preceding ‘;’ (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 572 1 SofaBaseTopology
Error 58 error C2334: unexpected token(s) preceding ‘{‘; skipping apparent function body (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 581 1 SofaBaseTopology
Error 69 error C2447: ‘{‘ : missing function header (old-style formal list?) (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 736 1 SofaBaseTopology
Error 65 error C2923: ‘Eigen::JacobiSVD’ : ‘MatrixType’ is not a valid template type argument for parameter ‘_MatrixType’ (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 640 1 SofaBaseTopology
Error 66 error C2975: ‘QRPreconditioner’ : invalid template argument for ‘Eigen::JacobiSVD’, expected compile-time constant expression (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 640 1 SofaBaseTopology
Error 61 error C2988: unrecognizable template declaration/definition (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 639 1 SofaBaseTopology
Error 54 error C4430: missing type specifier – int assumed. Note: C++ does not support default-int (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 572 1 SofaBaseTopology
Error 57 error C4430: missing type specifier – int assumed. Note: C++ does not support default-int (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 580 1 SofaBaseTopology
Error 60 error C4430: missing type specifier – int assumed. Note: C++ does not support default-int (C:\Users\Michel\sofa\src\modules\SofaBaseTopology\EdgeSetGeometryAlgorithms.cpp) c:\users\michel\sofa\src\include\eigen\src\SVD\JacobiSVD.h 639 1 SofaBaseTopologyI’ll retry with an external Eigen…
Michel
19 February 2016 at 20:53 #5851MichelBlockedOn a related note, your dashboard is red for Windows builds right now. 😉
Cheers,
Michel
21 February 2016 at 18:44 #5852MichelBlockedHi gents,
I’m working on this again today. I’m wondering if some of my Eigen tribulations have something to do with the fact that CMake is not finding Csparse or Metis properly.
SofaSparseSolver: metis was not found, SparseLDLSolver won’t be built
SofaSparseSolver: csparse was found, SparseLUSolver and SparseCholeskySolver will be built
Even when I try to link the extlibs path for these explicitly, CMake pretends that they do not exist, and complains of missing Csparse and Metis.I’ve tried reverting back to the version of Eigen that you had in the past, but you’ve completely changed the way CMake works in relation to Eigen so I cannot do that. When I try to link with an external Eigen, say 3.2.8, copied onto the extlibs directory with CMakeLists tweaked appropriately, it seems to flood the CMake interface with more variables. I’m working on it now to see what else can be done.
I’m open to any solution.
It was never my intention to work with Windows to begin with, but right now there is no solution other than windows that supports the Omni. Inasmuch as SOFA probably wants to support the Omni, I hope that the community can find a robust solution for this build issue, including Eigen. It is very real. I have the directory structure exactly as was suggested. Also, there needs to be more a push on the dashboard side towards green dashboards in Windows, so that we know that this is feasible. Otherwise, it would seem that SOFA and Omnis are incompatible, which is a major issue.
Meanwhile, Cece’s Master’s hangs in the balance… Best wishes,
Michel
21 February 2016 at 20:27 #5853MichelBlockedHi all,
I made a bit of progress, although it’s still to early to declare victory, as the build has not completed. I managed to get through the build error previously due to Eigen 3.2.7 by replacing the SVD-related files by those from Eigen 3.2.8. The error seemed to be due to the use of SVDBase in JacobiSVD.h, without a prior inclusion of SVDBase.h in that former header file. I tried doing an include of SVDBase.h, but whatever reason the compiler was not finding it; the version of Eigen 3.2.8 does not have any reference to SVDBase in the implementation, presumably because of build problems. At this point, my build is still ongoing, and its plowing through with a bunch of warnings, however no errors, well past the inclusion of JacobiSVD in SOFA files.
I suggest that you look into Eigen 3.2.8 for the current release of SOFA.
I will feel more confident if it builds to the end and actually runs on Windows.
Michel
21 February 2016 at 20:53 #5854MichelBlockedSuccess. I do recommend that change to JacobiSVD.h. No QT problems at runtime either, as Cece had seen. Using Qt 5.5.1 as suggested in the online doc.
22 February 2016 at 08:56 #5859GuillaumeKeymasterHi Michel,
Very glad you succeeded ! 🙂
About the red in the dashboard: maintaining a working code on all platforms is an harassing work … that’s the reason why we strongly advise to use stable versions of SOFA (latest is 15.12).
About Csparse and Metis: that’s totally normal.
About your Eigen errors: what was your exact setup (Windows version, Visual Studio version, SOFA version, build type, …) ? That’s the first time we hear about these errors, I’d like to try to reproduce them.
Regards,
Guillaume.22 February 2016 at 19:39 #5887MichelBlockedHi Guillaume,
I also am a believer in stable releases; you are preaching to the choir :-).
My exact setup is Windows 7, Microsoft VS 11 (2012) 32-bit compilation, GIT clone stable version. Used the QT 5.5.1 binaries and Boost 1.60 as suggested. Directory structure as suggested. On all occasions I tried, the build hit the ditch at the Eigen 2.2.7 build. Also saw it with MS VS 2010.
I tried using a different version of Eigen, 2.2.8, but doing that caused my CMake interface to be flooded with several more variables related to the Eigen build, and I seemed to lose a few that SOFA needed. In short, it was not a viable solution without changes to the CMakeLists file. For this reason, I simply made changes, to the SVD section alone, which I took from 2.2.8. 2.2.8 as a whole may be viable if you make edits to the CMake variables used by Eigen. I saw that the use of SVDBase appears to be deprecated in Eigen 2.2.8, so I figured, rightly, that it would solve the problem.
I don’t understand why there aren’t any more complaints about this. Maybe the calling programs in older releases that use JacobiSVD.h all include SVDBase ahead of time, but in my build there is no way for the former header file to be informed of the latter class, which was precisely the problem.
22 February 2016 at 19:46 #5888MichelBlockedThat was a mistype. Eigen 3.2.7 and 3.2.8 respectively.
-
AuthorPosts
- You must be logged in to reply to this topic.