Hello,
I can compile the TugOfWar and OptimizationExample_Arm26 examples, but when I try to run it from VS, I get
Unable to start program
'C:...\OpenSimWorkspace\ExampleMain\build\Release\ALL_BUILD'.
The system cannot find the file specified.
When I try to go into the Release folder and click on the executable I get
TugOfWar1_CreateModel.exe has stopped working.
I know there are some ALL_BUILD files in the ExampleMain\build directory.
I tried to copy them over to the release directory, but that did not work. Not sure, what to do next.
Thank you.
Examples compile but won't execute
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Examples compile but won't execute
Hi,
I think the problem is caused by trying to execute the target "ALL_BUILD" in visual studio which does not correspond to a specific executable. Please set the project that builds TugOfWar1_CreateModel.exe (or OptimizationExample_Arm26.exe) as your startup project in VisualStudio before you try running. This can be done by choosing the project in Solution Explorer, right-mouse-click then select "Set as StartUp Project".
Hope this helps,
-Ayman
I think the problem is caused by trying to execute the target "ALL_BUILD" in visual studio which does not correspond to a specific executable. Please set the project that builds TugOfWar1_CreateModel.exe (or OptimizationExample_Arm26.exe) as your startup project in VisualStudio before you try running. This can be done by choosing the project in Solution Explorer, right-mouse-click then select "Set as StartUp Project".
Hope this helps,
-Ayman
Re: Examples compile but won't execute
I have set Example Main as the startup project, but I get a message about
Debugging information for 'TugOfWar1_CreateModel.exe' cannot be found or does not match. Binary was not built with debug information.
When I press No I get:
'TugOfWar1_CreateModel.exe': Loaded 'C:\Users\Juan\Documents\OpenSimWorkspace\ExampleMain\build\Release\TugOfWar1_CreateModel.exe', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimCommon.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\xerces-c_2_8.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\OpenSim_SimTKcommon.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\SimTKlapack.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\pthreadVC2.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Symbols loaded.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\OpenSim_SimTKmath.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimSimulation.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\OpenSim_SimTKsimbody.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimAnalyses.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimActuators.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimTools.dll', Binary was not built with debug information.
The program '[11012] TugOfWar1_CreateModel.exe: Native' has exited with code 0 (0x0).
Debugging information for 'TugOfWar1_CreateModel.exe' cannot be found or does not match. Binary was not built with debug information.
When I press No I get:
'TugOfWar1_CreateModel.exe': Loaded 'C:\Users\Juan\Documents\OpenSimWorkspace\ExampleMain\build\Release\TugOfWar1_CreateModel.exe', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimCommon.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\xerces-c_2_8.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\OpenSim_SimTKcommon.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\SimTKlapack.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\pthreadVC2.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'TugOfWar1_CreateModel.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Symbols loaded.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\OpenSim_SimTKmath.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimSimulation.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\OpenSim_SimTKsimbody.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimAnalyses.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimActuators.dll', Binary was not built with debug information.
'TugOfWar1_CreateModel.exe': Loaded 'C:\OpenSim2.4.0\bin\osimTools.dll', Binary was not built with debug information.
The program '[11012] TugOfWar1_CreateModel.exe: Native' has exited with code 0 (0x0).
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Examples compile but won't execute
Hi,
OpenSim distributions do not include debuggable libraries (we can't distribute debuggable runtime libraries per Microsoft's License agreement) that's why you build either "Release" or "RelWithDebInfo" configurations only. The warnings you get are benign and confirm that you don't have a debuggable environment. The return value of 0 from the program execution indicates that it ran to completion without problem.
Please let us know if you have further questions.
-Ayman
OpenSim distributions do not include debuggable libraries (we can't distribute debuggable runtime libraries per Microsoft's License agreement) that's why you build either "Release" or "RelWithDebInfo" configurations only. The warnings you get are benign and confirm that you don't have a debuggable environment. The return value of 0 from the program execution indicates that it ran to completion without problem.
Please let us know if you have further questions.
-Ayman
Re: Examples compile but won't execute
There still seems to be a problem with the execution of the Optimization Example. From what I can tell it cuts off pretty soon after it enters the main. Below I have indicated where in the code it stops executing:
Not sure what the problem is, so any help or insight would be appreciated. Thank you.
Code: Select all
int main()
{
int test;
try {
std::clock_t startTime = std::clock();
// Create a new OpenSim model
LoadOpenSimLibrary("osimActuators");
Model osimModel("Arm26_Optimize.osim");