Building OpenSurgSim on Windows x64, VS2013

51 views
Skip to first unread message

Pedro Marques

unread,
Jul 7, 2015, 8:06:25 PM7/7/15
to opens...@simquest.com
Hello,

I've been trying to build OpenSurgSim for some days now. At first, I had a lot of problems with dependencies, but although I think I've got them figured out now, I still can't build the examples projects. I can build everything except for DroppingBalls, GraphicsScene and ShowScenery, which all fail with the following errors:

1>------ Build started: Project: DroppingBalls, Configuration: Release x64 ------
1>  Building Custom Rule C:/Users/nlopes/Documents/IPCA/EDJD/Undergraduate Research/OpenSurgSim/Examples/DroppingBalls/CMakeLists.txt
1>  CMake does not need to re-run because C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\build\Examples\DroppingBalls\CMakeFiles\generate.stamp is up-to-date.
1>  AddRandomSphereBehavior.cpp
1>  DroppingBalls.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(55): error C2061: syntax error : identifier 'unique_lock' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(61): error C2065: 'unique_lock' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(61): error C2065: 'mutex' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(61): error C2065: '_Lck' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(61): error C2275: '_Predicate' : illegal use of this type as an expression (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(60) : see declaration of '_Predicate'
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(61): error C2146: syntax error : missing ')' before identifier '_Pred' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(61): error C2182: 'wait' : illegal use of type 'void' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(61): error C2365: 'std::condition_variable::wait' : redefinition; previous definition was 'member function' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(55) : see declaration of 'std::condition_variable::wait'
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(61): error C2059: syntax error : ')' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(71): error C2065: '_Rep' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(71): error C2065: '_Period' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(71): error C2923: 'std::chrono::duration' : '_Rep' is not a valid template type argument for parameter '_Rep' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(71): error C2923: 'std::chrono::duration' : '_Period' is not a valid template type argument for parameter '_Period' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(72): error C2334: unexpected token(s) preceding '{'; skipping apparent function body (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(81): error C2065: 'unique_lock' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(81): error C2065: 'mutex' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(81): error C2065: '_Lck' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(82): error C2988: unrecognizable template declaration/definition (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(82): error C2059: syntax error : 'const' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(93): error C2065: '_Clock' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(93): error C2065: '_Duration' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(93): error C2923: 'std::chrono::time_point' : '_Clock' is not a valid template type argument for parameter '_Clock' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(93): error C2923: 'std::chrono::time_point' : '_Duration' is not a valid template type argument for parameter '_Duration' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(94): error C2334: unexpected token(s) preceding '{'; skipping apparent function body (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(104): error C2065: 'unique_lock' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(104): error C2065: 'mutex' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(104): error C2065: '_Lck' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(105): error C2988: unrecognizable template declaration/definition (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(105): error C2059: syntax error : 'const' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(116): error C2334: unexpected token(s) preceding '{'; skipping apparent function body (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(126): error C2065: 'unique_lock' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(126): error C2065: 'mutex' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(126): error C2065: '_Lck' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(127): error C2988: unrecognizable template declaration/definition (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(127): error C2059: syntax error : 'const' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(138): error C2334: unexpected token(s) preceding '{'; skipping apparent function body (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(142): error C2061: syntax error : identifier 'unique_lock' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(144): error C2988: unrecognizable template declaration/definition (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(144): error C2059: syntax error : '&' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(144): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(144): warning C4183: '_Cnd_register_at_thread_exit': missing return type; assumed to be a member function returning 'int' (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(147): error C2628: 'std::condition_variable' followed by 'void' is illegal (did you forget a ';'?) (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(147): error C2065: 'mutex' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(147): error C2065: '_Mtx' : undeclared identifier (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\condition_variable(148): fatal error C1903: unable to recover from previous error(s); stopping compilation (C:\Users\nlopes\Documents\IPCA\EDJD\Undergraduate Research\OpenSurgSim\Examples\DroppingBalls\DroppingBalls.cpp)
========== Build: 0 succeeded, 1 failed, 12 up-to-date, 0 skipped ==========


I believe these errors must be related to my lack of experience building complex C++ solutions, but maybe someone could point to me just what might be wrong? My google-fu is really failing me on this one.

Thanks in advance!
Pedro Marques

Harald Scheirich

unread,
Jul 8, 2015, 8:54:50 AM7/8/15
to Pedro Marques, openSurgSim
Hi Pedro, maybe we can help you. Could you please post the version numbers of the software that you are using. Visual Studio, boost, Openscenegraph

It looks like you are using VS2013 ? We are currently mainly using 2012. 

Thanks, Harry 

--
You received this message because you are subscribed to the Google Groups "openSurgSim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opensurgsim...@simquest.com.
To post to this group, send email to opens...@simquest.com.
Visit this group at http://groups.google.com/a/simquest.com/group/opensurgsim/.



--
Harald Scheirich
Principal Software Engineer
Simquest Solutions Inc. 

Pedro Marques

unread,
Jul 8, 2015, 3:59:07 PM7/8/15
to opens...@simquest.com, pedroab...@gmail.com
Thank you Harry,

Visual Studio 2013 was indeed the problem. Using Visual Studio 2012 I was finally able to build everything without errors. For future reference, here is the software and dependencies I am using:

  • Visual Studio Professional 2012, Update 4
  • Boost 1.5.8
  • Eigen 3.2.1
  • GMock 1.7.0
  • OpenSceneGraph 3.2.1

I am now looking at the available documentation and at the examples source code and trying to understand the system. I found the snippets section on Assembla, but maybe you could point me to more code samples?

Thanks again,

Pedro Marques

Reply all
Reply to author
Forward
0 new messages