- This topic has 3 replies, 3 voices, and was last updated 4 years, 4 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Building SOFA › [SOLVED] Failed to build on Visual Studio 2019
Tagged: 64_bits, build sofa on windows, SOFA_1912, VS2019, Windows_10
Hi everyone !
I am trying to install sofa on my Windows computer with Visual Studio 2019.
I managed to configure and generate the project on cmake-gui and then I launched a sofa compilation on VS19. Everything was going well when, not far from the end of the compilation, it stops and I get 70 messages describing two types of errors.
The first one (1 message):
Erreur C2676 '>>' binaire : 'std::istream' ne définit pas cet opérateur ou une conversion vers un type acceptable pour l'opérateur prédéfini (compilation du fichier source C:\dev\sofa\SofaKernel\modules\SofaHelper\src\sofa\helper\types\fixed_array.cpp) SofaHelper C:\dev\sofa\SofaKernel\modules\SofaHelper\src\sofa\helper\fixed_array.h 351
and one of the 69 others :
Erreur LNK1181 impossible d'ouvrir le fichier en entrée '..\..\lib\MinSizeRel\SofaSimpleFem.lib'
SofaMiscMapping C:\dev\sofabuild\SofaMisc\SofaMiscMapping\LINK 1
(the different libraries are not found)
How can I solve this problem?
Thank you,
Rayan
I had the same problem and I solved it with @hugo. To solve it, go in fixed_array.h
by double-clicking on the error, and add #include <iostream>
.
The top of your file should look like this :
#ifndef SOFA_HELPER_FIXED_ARRAY_H
#define SOFA_HELPER_FIXED_ARRAY_H
#include <sofa/helper/system/config.h>
#include <sofa/helper/helper.h>
#include <cstddef>
#include <stdexcept>
#include <iterator>
#include <algorithm>
#include <cmath>
#include <cassert>
#include <iostream>
Let me know if it solved your problem.
Hi @brunob81hk
Thanks for reporting the problem.
It has been proposed as a PR here. I think we can close the topic here, is it fine for you Bruno-Pier?
Best wishes,
Hugo
It’s fine for me!
Thanks a lot!
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.