Home › Forum › SOFA › Building SOFA › [SOLVED] Sofa Build Error in Windows 10 x64 VS 2019
Tagged: Windows 10 x64 build
- This topic has 8 replies, 3 voices, and was last updated 3 years, 12 months ago by AlainD.
-
AuthorPosts
-
10 November 2020 at 15:46 #17612AlainDBlocked
Hi everybody,
I’ve tried to build sofa following the a href=”https://www.sofa-framework.org/community/doc/getting-started/build/windows/”>documentation
and this video on Youtube Sofa playlist from beginning to the end.
I ran into exactly the same issues as the user who posted the video, especially to add HAPI and H3D, but finally the generation of VS solution seems to work correctly,
though i have some part that are not found :Looking for execinfo.h Looking for execinfo.h - not found Looking for getline Looking for getline - not found GLEW_DIR-NOTFOUND FFMPEG_EXEC-NOTFOUND SofaDistanceGrid_DIR-NOTFOUND SofaPython_DIR-NOTFOUND SofaSphFluid_DIR-NOTFOUND metis_DIR-NOTFOUND
But I have the solution file generated, and the problems occurs during build.
I build in Release mode x64, and it takes around 45 minutes (I might be a little short on RAM with 8Gb, but i have a decent computer, with I5 CPU) which apparently is much longer that what should be.During the build the first errors appearing concern HAPI and H3D :
Error C1083 Cannot open include file: 'HAPI/HAPI.h': No such file or directory (compiling source file C:\Dev\Sofa\src\applications\plugins\SofaHAPI\SofaHAPIForceFeedbackEffect.cpp) SofaHAPI C:\Dev\Sofa\dependencies\H3D\HAPI\include\HAPI\HAPIHapticObject.h 32 Error C1083 Cannot open include file: 'H3DUtil/H3DUtil.h': No such file or directory (compiling source file C:\Dev\Sofa\src\applications\plugins\SofaHAPI\SofaHAPIHapticsDevice.cpp)
And later, I get hundreds of errors coming from QtWidgets, for example :
112> C:\Dev\Sofa\src\applications\projects\SofaGuiGlut\Main.cpp(51,10): fatal error C1083: Cannot open include file: 'SofaValidation/CompareState.h': No such file or directory 112>C:\Dev\Sofa\src\applications\projects\SofaGuiGlut\Main.cpp(51,10): fatal error C1083: Cannot open include file: 'SofaValidation/CompareState.h': No such file or directory 110> C:\Dev\Qt\5.15.0\msvc2019_64\include\QtWidgets/qtableview.h(187,5): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (compiling source file C:\Dev\Sofa\build\SofaGui\SofaGuiQt\src\sofa\gui\qt\moc_LinkWidget.cpp) 110> C:\Dev\Qt\5.15.0\msvc2019_64\include\QtWidgets\qtablewidget.h(229,1): error C2504: 'QTableView': base class undefined (compiling source file C:\Dev\Sofa\build\SofaGui\SofaGuiQt\src\sofa\gui\qt\moc_LinkWidget.cpp) C:\Dev\Qt\5.15.0\msvc2019_64\include\QtWidgets\qtablewidget.h(229,1): error C2504: 'QTableView': base class undefined (compiling source file C:\Dev\Sofa\src\modules\SofaGuiQt\src\sofa\gui\qt\RealGUI.cpp) 110> C:\Dev\Qt\5.15.0\msvc2019_64\include\QtWidgets/qtableview.h(53,34): error C2011: 'QTreeView': 'class' type redefinition (compiling source file C:\Dev\Sofa\src\modules\SofaGuiQt\src\sofa\gui\qt\RealGUI.cpp) Done building project "SofaGuiQt.vcxproj" -- FAILED. 131> LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\SofaGuiQt.lib' : fatal error LNK1181: cannot open input file '..\..\..\..\lib\Release\SofaGuiMain.lib'
I looked in the forum for similar issues, but couldn’t find any clue on what’s going on !
I’m pretty new to Cmake and C++ build so it’s probably my fault !Thanks for help !
10 November 2020 at 16:41 #17624FroyKeymasterHello,
Is there any need for GuiGlut and SofaHAPI ?
Those two plugins/applications are not supported anymore and nobody is taking care of them.
-GuiGlut is creating a GUI using Glut (a really old framework for creating GUIs with OpenGL)
– SofaHAPI is (was?) created to support haptics devices if I remember well.I am really not surprised those two do not compile anymore 🤐
10 November 2020 at 16:55 #17625AlainDBlockedHi Froy, thanks for your answer !
indeed, I don’t really need it, I just followed the steps in the Youtube video where he was adding it manually.
I will try to rebuild the solution without these and see if there is an improvement !
Thx !10 November 2020 at 17:06 #17626FroyKeymasterMy advice would be:
– first start with the defaults choices
– build successfully 🧐
– add/remove other options later on, to play with them10 November 2020 at 21:49 #17627AlainDBlockedOk, I tried it but it didn’t work out.
I had to hard reset the build after more than one hour
and I had the same kind of mistakes with QtWidgets,
but I couldn’t copy/paste them, because my computer was barely responding.and another thing, I can’t get SophaPython to work, even if i specify the acces to my python .exe, but I don’t know if it has an impact.
I will try another time to see if i can retrieve some interesting error logs !
Edit :
This time the build has been shorte (probably 30 minutes), but i still have almost 400 errors coming from SofaGuiQt mainly16 November 2020 at 12:59 #17665AlainDBlockedHi everybody,
I think i found what is the problem,
When i build the solution with Cmake,
It doesn’t find QtWebEngine.
I have added CMAKE_PREFIX_PATH to my Qt installation (C:/Dev/Qt/5.15.0/msvc2019_64).
What i found odd, is that the environment variables with CMake concerning QT are all pointing to msvc2019_32 instead of 64.
And even if i change everything to the 64 Qt folder, it doesn’t find QtWidget,
even if WebEngine is present on my system.18 November 2020 at 08:21 #17712HugoKeymasterdid you requested the installation of the QtWebEngine at the Qt install?
It is detailed here in the doc.Best
Hugo
18 November 2020 at 10:43 #17721AlainDBlockedHi Hugo,
Yes it is properly installed.
According to Juan Pablo that you know well,
it is a problem of some files that are generated during the build that can’t compile properly.
I will try with another QT version and a clean install, but unfortunately these days i d’ont have much time for it.
I will write here if the things get better.
Thank you !Alain
20 November 2020 at 10:54 #17773AlainDBlockedI finally managed to build everything properly.
It was the Qt version that was causing the problem apparently.
I reinstalled Qt, this time 5.14.2 instead of 15.1,
and used msvc2017_64 instead of msvc2019_64 and it worked.
Just in case anybody needs it, here are the cmake environment variables that i had to add to make everything work :
CMAKE_PREFIX_PATH : C:/myPath/Qt/5.14.2/msvc2017_64
BOOST_ROOT : C:/myPath/Boost/boost_1_74_0
Eigen3_DIR : C:/myPath/Sofa/src/extlibs/eigen-3.3.8
EIGEN3_INCLUDE_DIR : C:/myPath/Sofa/src/extlibs/eigen-3.3.8
(In my case, the name of the variables for Eigen had to be written exactly like that, it is case sensitive, and eigen had to be in extlibs otherwise it was not finding it)I hope it will be useful. I will close the topic !
-
AuthorPosts
- You must be logged in to reply to this topic.