Hi,
I'm trying to compile the TugOfWar example in the \OpenSim2.2\sdk\APIExamples\ExampleMain folder, and I've managed to get everything fine and running, up until the "Build Solution" part in C++ (Visual C++ 2008 Express Edition). When I build the solution, I get the following message:
"Please specify the name of the executable file to be used for the debug session" (see figure below).
http://screencast.com/t/mg5Dq0lg
I can get around this by asking C++ to "Rebuild" the solution -- that window doesn't appear anymore. However, I'm still not getting the "OpenSim example completed successfully" message mentioned in the Developer's guide (Section 2.2)
Does anyone know how to fix this?
Thanks,
Adila
TugOfWar OpenSim ExampleMain
- arun ramakrishnan
- Posts: 8
- Joined: Sat Nov 15, 2008 6:46 pm
RE: TugOfWar OpenSim ExampleMain
this happens when you use CMake 2.8 to make the solution. in yout Visual Studio solution explorer (right sidebar on your screenshot), select the ExampleMain project , right click and "Set as Startup Project". this is the project that holds the "main()" function. should work just fine.
- Nur Adila Faruk Senan
- Posts: 75
- Joined: Tue Apr 06, 2010 8:20 pm
RE: TugOfWar OpenSim ExampleMain
Hey Arun,
Thanks for your suggestion.
I did what you mentioned and, it wouldn't create the TugOfWar1_CreateModel OpenSim model (I get the output message shown here: http://screencast.com/t/haz6o9cB), so I decided to try and see if it'd work with the TugOfWar_Complete model instead-- it worked! Thanks!
Specifically,
1. I changed the text in the cmakelists.txt from
SET(TARGET TugOfWar1_CreateModel
to
SET(TARGET TugOfWar_Complete
2. compiled it in CMake 2.6
3. Opened the solution file OpenSimTugOfWar.sln in Visual C++
4. Right-clicked on "Example Main" --> Set as StartUp Project
5. Clicked on All_Build --> Build (RelWithDebInfo)
A number of debug warning messages came up though, but I clicked "continue" throughout, and it worked. Got it to create the tugofWar_model.osim file
Thanks again for the help!
adila
Thanks for your suggestion.
I did what you mentioned and, it wouldn't create the TugOfWar1_CreateModel OpenSim model (I get the output message shown here: http://screencast.com/t/haz6o9cB), so I decided to try and see if it'd work with the TugOfWar_Complete model instead-- it worked! Thanks!
Specifically,
1. I changed the text in the cmakelists.txt from
SET(TARGET TugOfWar1_CreateModel
to
SET(TARGET TugOfWar_Complete
2. compiled it in CMake 2.6
3. Opened the solution file OpenSimTugOfWar.sln in Visual C++
4. Right-clicked on "Example Main" --> Set as StartUp Project
5. Clicked on All_Build --> Build (RelWithDebInfo)
A number of debug warning messages came up though, but I clicked "continue" throughout, and it worked. Got it to create the tugofWar_model.osim file
Thanks again for the help!
adila
RE: TugOfWar OpenSim ExampleMain
Hi,
I have a problem executing the TugOfWar_Complete program. There are no compile errors or warnings. However, after hitting <Ctrl+F5> no single message showed up on the screen. It appears that "PERFORM A SIMULATION" section in the main program causes this. (TugOFWar1_CreateModel works just fine.) I noticed that these example programs in OpenSim2.2 are slightly different from those in the previous versions (e.g., 2.0.2). Any suggestions/comments would be appreciated.
Thanks,
Ko
I have a problem executing the TugOfWar_Complete program. There are no compile errors or warnings. However, after hitting <Ctrl+F5> no single message showed up on the screen. It appears that "PERFORM A SIMULATION" section in the main program causes this. (TugOFWar1_CreateModel works just fine.) I noticed that these example programs in OpenSim2.2 are slightly different from those in the previous versions (e.g., 2.0.2). Any suggestions/comments would be appreciated.
Thanks,
Ko
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
RE: TugOfWar OpenSim ExampleMain
Hi Ko,
Are you sure you're running from a directory that contains the .obj files for the geometry? If you build your executable using RelWithDebInfo configuration you should at least be able to tell which line is crashing. Can you try that and let me know? Also what version of visual studio and distribution are you using? If using VS8Pro, VS9Pro, VS9Express you have to use the corresponding distribution.
Please let me know your findings,
Thanks,
-Ayman
Are you sure you're running from a directory that contains the .obj files for the geometry? If you build your executable using RelWithDebInfo configuration you should at least be able to tell which line is crashing. Can you try that and let me know? Also what version of visual studio and distribution are you using? If using VS8Pro, VS9Pro, VS9Express you have to use the corresponding distribution.
Please let me know your findings,
Thanks,
-Ayman
RE: TugOfWar OpenSim ExampleMain
Hi Ayman,
It stops at line 250 "CoordinateSet& modelCoordinateSet = osimModel.updCoordinateSet();" (The Debug mode stops responding to the Step into command <F11>.)
I am using VC9Express.
Thank you.
Ko
It stops at line 250 "CoordinateSet& modelCoordinateSet = osimModel.updCoordinateSet();" (The Debug mode stops responding to the Step into command <F11>.)
I am using VC9Express.
Thank you.
Ko
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
RE: TugOfWar OpenSim ExampleMain
Hi Ko,
Can you check the output tab in your visual studio when running to make sure the correct dlls are being loaded? Do you have multiple installations of OpenSim on your machine? I'm suspecting a mixup of the libraries as the line you're referring to is rather benign. Also note that Microsoft keeps updating VS9Express so the version you have maybe different from what was used to build the VS9E distribution. When did you install it?
-Ayman
Can you check the output tab in your visual studio when running to make sure the correct dlls are being loaded? Do you have multiple installations of OpenSim on your machine? I'm suspecting a mixup of the libraries as the line you're referring to is rather benign. Also note that Microsoft keeps updating VS9Express so the version you have maybe different from what was used to build the VS9E distribution. When did you install it?
-Ayman
RE: TugOfWar OpenSim ExampleMain
Hi Ayman,
I am not sure if dlls are correctly loaded, but in terms of multiple installations, I have source-code-built OpenSim on my computer. The "Environment Variables" section has both "PATH" for OpenSim2.2 and "OPENSIM_LIB_PATH" for the source code OpenSim. Is this possibly a problem?
The VC9E version is "Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1." This is from the info in the output tab. It was installed several months ago, I believe.
Thank you.
Ko
I am not sure if dlls are correctly loaded, but in terms of multiple installations, I have source-code-built OpenSim on my computer. The "Environment Variables" section has both "PATH" for OpenSim2.2 and "OPENSIM_LIB_PATH" for the source code OpenSim. Is this possibly a problem?
The VC9E version is "Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1." This is from the info in the output tab. It was installed several months ago, I believe.
Thank you.
Ko