Home › Forum › SOFA › Building SOFA › [SOLVED] Building Sofa on Windows VS2013 with boost
Tagged: boost, building, visualstudio2013, Windows
- This topic has 8 replies, 3 voices, and was last updated 8 years, 9 months ago by LHWlen.
-
AuthorPosts
-
4 January 2016 at 00:07 #5259LHWlenBlocked
Hi everyone!
I am a new user of sofa, I try to build sofa on windows especially on VisualStudio 2013.
And I failed to build it.
I was following maybe a kinds of “outdated” instruction to build sofa,
which is in need to build “boost”.I noticed that the option tags of CMake is different from the instruction,
and I also found that you are using miniboost.My question is :
1.Is it possible to build sofa on VisualStudio2013, since I cannot find an official instruction to do it.(only VS2010 VS2012)
2.Is it possible to NOT build extra boost since you have miniboost in the source, which means my excess work on extra boost made me unable to build sofa.Thanks for your kind help.
-wlen
4 January 2016 at 00:55 #5260LHWlenBlockedHi,
sorry for the inpatient post.
I just want to detail the compile error of the last post.1.compiling with miniboost
by following the official doc of windows
I didn’t change any tags of Cmake options.
I got several compile error , the first is:
“error C2039 assert_not_arg : ‘boost::mpl’ is not a member of ….”
this error located in “sofa\extlibs\miniBoost\boost\iterator\detail\facade_iterator_category.hpp 166 1”Next,
2.compile with external boostI build the boost_1_59_0(also 1_55_0),
and setting the tags of Cmake options especially :
BOOST_ROOT “../boost_1_59_0”
Boost_CHRONO_LIBRARY_DEBUG “../boost_1_55_0/boost_1_55_0/bin.v2/libs/chrono/build/msvc-12.0/debug/link-static/threading-multi/libboost_chrono-vc120-mt-gd-1_55.lib”Boost_CHRONO_LIBRARY_RELEASE “../boost_1_55_0/boost_1_55_0/bin.v2/libs/chrono/build/msvc-12.0/release/link-static/threading-multi/libboost_chrono-vc120-mt-gd-1_55.lib”
and so as the other library directory,
Boost_DIR Boost_DIR-NOTFOUND (always not found)
Boost_INCLUDE_DIR “../boost_1_59_0”
and so as the other library directory.then, I got the compile error:
C2228 ‘select_on_container_copy_construction in the file “has_member_funtion_callable_with.hpp row200 1” of SofaHelper project.that is the detail of my problem, I hope it can be helpful.
Thanks.
-wlen
4 January 2016 at 10:10 #5263FroyKeymasterHello,
(I am actually compiling Sofa with Visual Studio 2015)
Actually, we are planning to remove miniboost one day, so it would be better to use “normal” boost libraries.For your 2nd problem then, I noticed that you are not using the same boost version between your include directory (Boost_INCLUDE_DIR “../boost_1_59_0”) and your binaries (Boost_CHRONO_LIBRARY_RELEASE “../boost_1_55_0/boost_1_55_0/bin.v2).
Therefore I think your error may come from the confusion.Hope that helps.
4 January 2016 at 11:40 #5264LHWlenBlockedHi Froy,
Thanks for your answer,
I will continue compiling on VisualStudio2013,Sorry for the mistake of the last post.
I use only one version of boost, and I tried an old one before.
The setting of Cmake is always the same boost version, but still I got the same error C2228 in both version of boost.if I choose to use external boost,
I want to ask my Cmake configuration is correct or not? (except the different versions)
if it possible, I want to refer to your Cmake configurartion.Or any other mistakes may cause the problem.
Thank you
4 January 2016 at 13:19 #5265FroyKeymaster(for VS2015, I just wanted to say that if it is working for VS2015, VS2013 should have no problem 😉 )
Let’s try different things:
1- CMake may have been confused with the directories so do you clear cache when you set the boost paths ? (just to be sure)
2- Can you make sure that Visual Studio is getting the right paths ? (when you go to SofaHelper’s properties, look at the compilation command. Right click on SofaHelper -> Properties -> Configuration Properties -> C/C++ -> Command Line)
3- Where did you get boost ? precompiled from boost website or did you compile your own version ?6 January 2016 at 10:52 #5292LHWlenBlockedThanks again Froy,
as for your suggestion:
“1. CMake may have been confused with the directories so do you clear cache when you set the boost paths ? (just to be sure)”
-answer: I’m sure I cleared, I always use new directory, for a new sofa compiling, I did it when I changed the boost version.“2- Can you make sure that Visual Studio is getting the right paths ?”
-answer: Yes I can see all the boost lib is in project property of linker.“3- Where did you get boost ? precompiled from boost website or did you compile your own version ?“
-answer: I always build boost by myself. I tried building boost today again, still have the C2228 ‘select_on_container_copy_construction in the file ” error.
by the way, I got failed updating 8 errors in the boost building.7 January 2016 at 12:54 #5295FroyKeymasterHello LHWlen,
On Windows, I am using the prebuilt binaries from boost (http://sourceforge.net/projects/boost/files/boost-binaries/1.59.0/ ).
Maybe there is a problem with your boost build configuration ? If it is possible, could you try to use the prebuilt libraries ?
(I am just guessing, I never encountered the error “select_on_container_copy_construction in the file”).
Hope this help !20 January 2016 at 14:53 #5354GuillaumeKeymasterHi LHWlen,
Did Froy solve your problem ?
I personally tried to build SOFA following Froy advices with the same configuration you have. It went well 🙂
Regards,
Guillaume.3 February 2016 at 05:15 #5517LHWlenBlockedIt solved!
Thank you Froy and guillaume, since I use prebuilted boost binaries,
and have those configurations, I succeed in building sofa. -
AuthorPosts
- You must be logged in to reply to this topic.