VC++ and OpenSim GUI with 4.0
- Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
VC++ and OpenSim GUI with 4.0
Hello,
After install OpenSim 4.0, I had some conflicts with VS C++ and OpenSim GUI.
VS C++ cannot build any programs. The error are saying "cannot open source file "OpenSim/Actuators/osimActuatorsDLL.h" File:BodyActuator.h". Do I have something to change environmental variables for VS C++?
Also, I still use OpenSim v3.3 GUI. But when GUI read model file, a window indicates Error message as attached image.
Is there any solutions for OpenSim 4.0 users?
Thank you,
Hide
After install OpenSim 4.0, I had some conflicts with VS C++ and OpenSim GUI.
VS C++ cannot build any programs. The error are saying "cannot open source file "OpenSim/Actuators/osimActuatorsDLL.h" File:BodyActuator.h". Do I have something to change environmental variables for VS C++?
Also, I still use OpenSim v3.3 GUI. But when GUI read model file, a window indicates Error message as attached image.
Is there any solutions for OpenSim 4.0 users?
Thank you,
Hide
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: VC++ and OpenSim GUI with 4.0
Hi,
Can you explain your environment? OpenSim 3.3 has a public ditribution of GUI and needs env. var OPENSIM_HOME to be set to locate resouces. OpenSim 4.0 GUI has not been publicly released though there are some Alpha builds that we made available. OpenSim 4.0 GUI doesn't need OPENSIM_HOME setting.
Generally, models created or saved in OpenSim 4.0 (API) cannot be read in OpenSim 3.3 GUI as the file formats have changed. We maintain backward compatibility so that 4.0 can read 3.3 files but the reverse doesn't work.
As to the missing header file you indicated, please describe your environment and we'll help you resolve.
Hope this helps,
-Ayman
Can you explain your environment? OpenSim 3.3 has a public ditribution of GUI and needs env. var OPENSIM_HOME to be set to locate resouces. OpenSim 4.0 GUI has not been publicly released though there are some Alpha builds that we made available. OpenSim 4.0 GUI doesn't need OPENSIM_HOME setting.
Generally, models created or saved in OpenSim 4.0 (API) cannot be read in OpenSim 3.3 GUI as the file formats have changed. We maintain backward compatibility so that 4.0 can read 3.3 files but the reverse doesn't work.
As to the missing header file you indicated, please describe your environment and we'll help you resolve.
Hope this helps,
-Ayman
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: VC++ and OpenSim GUI with 4.0
I've gotten that error window with 3.3 and I've been able to just ignore it.
- Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
Re: VC++ and OpenSim GUI with 4.0
Hi Ayman and Christopher,
I was surprised that osim definition has been changed from 3.3 to 4.0. But I assume 4.0 can read and execute simulation using 3.3 defined osim model. Is it correct?
The GUI error feels uncomfortable to see the animation. Will it be cleared when 4.0 is officially released?
Also do you have any idea about VS C++ error?
I changed the headers as below, but VS C++ returns error.
Do you have any suggestions?
Thank you,
Hide
I was surprised that osim definition has been changed from 3.3 to 4.0. But I assume 4.0 can read and execute simulation using 3.3 defined osim model. Is it correct?
The GUI error feels uncomfortable to see the animation. Will it be cleared when 4.0 is officially released?
Also do you have any idea about VS C++ error?
I changed the headers as below, but VS C++ returns error.
Code: Select all
#include "C:\opensim-core\OpenSim\OpenSim.h"
#include "C:\opensim-core\sdk\Simbody\include\Simbody.h"
#include "C:\opensim-core\sdk\include\OpenSim\Simulation\Control\Controller.h"
#include "C:\opensim-core\sdk\include\OpenSim\Common\AbstractProperty.h"
Thank you,
Hide
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: VC++ and OpenSim GUI with 4.0
Hide,
The error message is benign and can be ignored, or you can set OPENSIM_HOME env. variable to the top level directory of OpenSim 3.3 installation and the error will go away.
You normally do not specfy full path for headers in code, instead you specify the files relative tro some include folder, and have that folder specified in CMakeLists.txt or in Project settings in VS. How did you create the project in the first place? This may help us point you to a more sustainable way to compile/build the code. Also please indicate if using 3.3 ditribution or 4.0 from github.
Thanks,
-Ayman
The error message is benign and can be ignored, or you can set OPENSIM_HOME env. variable to the top level directory of OpenSim 3.3 installation and the error will go away.
You normally do not specfy full path for headers in code, instead you specify the files relative tro some include folder, and have that folder specified in CMakeLists.txt or in Project settings in VS. How did you create the project in the first place? This may help us point you to a more sustainable way to compile/build the code. Also please indicate if using 3.3 ditribution or 4.0 from github.
Thanks,
-Ayman
- Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
Re: VC++ and OpenSim GUI with 4.0
Hello Ayman,
My Win 7 has OPENSIM_HOME directing "C:\OpenSim 3.3\bin" on User variables, and OpenSim_Dir directing "C:\OpenSim 3.3\bin" on System variables.
Even this case, I got same error when I open an osim model file.
VS C++ programming:
When I checked CMAKE, I found "OPENSIM_INSTALL_DIR" was directing "c:\opensim 3.3\bin". However, even I changed it to new directory, VS C++ gives same error what I had.
Followings is a part of CMakeList.txt. I realized there are several environmental variables such as OpenSim_SOURCE_DIR, OPENSIM_HOME. In the aspect of programming, is it better the environmental variables of OPENSIM_HOME to new folder?
Thank you,
Hide
My Win 7 has OPENSIM_HOME directing "C:\OpenSim 3.3\bin" on User variables, and OpenSim_Dir directing "C:\OpenSim 3.3\bin" on System variables.
Even this case, I got same error when I open an osim model file.
VS C++ programming:
When I checked CMAKE, I found "OPENSIM_INSTALL_DIR" was directing "c:\opensim 3.3\bin". However, even I changed it to new directory, VS C++ gives same error what I had.
Followings is a part of CMakeList.txt. I realized there are several environmental variables such as OpenSim_SOURCE_DIR, OPENSIM_HOME. In the aspect of programming, is it better the environmental variables of OPENSIM_HOME to new folder?
Code: Select all
###########################################
## For building with the rest of OpenSim ##
###########################################
cmake_minimum_required(VERSION 2.6)
# Define project
PROJECT (Centralized_Control_Workshop_Simple)
INCLUDE_DIRECTORIES(${OpenSim_SOURCE_DIR} ${OpenSim_SOURCE_DIR}/Vendors)
SET(OPENSIM_INSTALL_DIR $ENV{OPENSIM_HOME}
CACHE PATH "Top-level directory of OpenSim install")
# Change name of build target
SET(TARGET CentralizedController CACHE TYPE STRING)
# Identify the cpp file(s) that were to be built
FILE(GLOB SOURCE_FILES *.h *.cpp)
SET(SOURCE ${SOURCE_FILES})
....
Hide
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: VC++ and OpenSim GUI with 4.0
Hide,
OPENSIM_HOME should NOT include bin at the end. Please set it to "C:\OpenSim 3.3" and retry. Same for OPENSIM_INSTALL_DIR
Please let us know how that goes,
-Ayman
OPENSIM_HOME should NOT include bin at the end. Please set it to "C:\OpenSim 3.3" and retry. Same for OPENSIM_INSTALL_DIR
Please let us know how that goes,
-Ayman
- Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
Re: VC++ and OpenSim GUI with 4.0
Hello Ayman,
Yes, changing OPENSIM_HOME to "C:\OpenSim 3.3" would solved GUI issue! Thank you.
But OPENSIM_INSTALL_DIR directing "C:\opensim-core" in CMake did not change so much.
Still I have error as this screen shot. Do you have any ideas?
Thank you
Hide
Yes, changing OPENSIM_HOME to "C:\OpenSim 3.3" would solved GUI issue! Thank you.
But OPENSIM_INSTALL_DIR directing "C:\opensim-core" in CMake did not change so much.
Still I have error as this screen shot. Do you have any ideas?
Thank you
Hide
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: VC++ and OpenSim GUI with 4.0
Dear Hide,
Assuming you're using 4.0 from github (since otherwise the term opensim-core was never used), then you should at the end of building from source, run the INSTALL target. This will copy the libraries and headers from Simbody and OpenSim into a new layout similar to distributions. This defaults to opensim-core-install unless you change it in CMake. Please check your CMake screen (used to build opneims-core) and use the install directory (shown as CMAKE_INSTALL_PREFIX in CMake GUI) for OPENSIM_INSTALL_DIR when configuring your project then CMake will find the headers and the problem will be fixed.
Please let us kow how that goes.
-Ayman
Assuming you're using 4.0 from github (since otherwise the term opensim-core was never used), then you should at the end of building from source, run the INSTALL target. This will copy the libraries and headers from Simbody and OpenSim into a new layout similar to distributions. This defaults to opensim-core-install unless you change it in CMake. Please check your CMake screen (used to build opneims-core) and use the install directory (shown as CMAKE_INSTALL_PREFIX in CMake GUI) for OPENSIM_INSTALL_DIR when configuring your project then CMake will find the headers and the problem will be fixed.
Please let us kow how that goes.
-Ayman
- Hide Kimpara
- Posts: 135
- Joined: Mon Sep 19, 2016 5:12 am
Re: VC++ and OpenSim GUI with 4.0
Hello Ayman,
Yes, I got 4.0 from github and built it from C:/opensim-core-source. Is there any installers for 4.0?
I followed the instruction on github. Therefore, the install directory is C:\opensim-core (I double-checked the CMAKE_INSTALL_PREFIX in CMake_GUI was C:\opensim-core).
In this environment, I addressed C:\opensim-core as the OPENSIM_INSTALL_DIR of my own project. Then, the headers were not recognized.
CMake screenshot of OpenSim 4.0 install CMake screenshot of my project Thank you and Best,
Hide
Yes, I got 4.0 from github and built it from C:/opensim-core-source. Is there any installers for 4.0?
I followed the instruction on github. Therefore, the install directory is C:\opensim-core (I double-checked the CMAKE_INSTALL_PREFIX in CMake_GUI was C:\opensim-core).
In this environment, I addressed C:\opensim-core as the OPENSIM_INSTALL_DIR of my own project. Then, the headers were not recognized.
CMake screenshot of OpenSim 4.0 install CMake screenshot of my project Thank you and Best,
Hide