Plugin help - Debug error
Posted: Wed Jan 05, 2011 8:40 pm
Hey Ayman,
I've been having some trouble trying to build an OpenSim plugin. I've been following the directions in the Developer's guide (Chapter 3: Creating Your Own Analysis) and I've also checked around in the forum pages, but I haven't been able to find anything helpful. I've managed to go through steps 1 through 4 (Prepare a working directory --> Rename Template --> Run CMake --> Open the solution file OsimPlugin.sln), but every time I try and build my solution, I get this error message in Visual Studio:
------ Build started: Project: Libraries - osimPlugin, Configuration: Release Win32 ------
Compiling...
RegisterTypes_osimPlugin.cpp
..\plugin\RegisterTypes_osimPlugin.cpp(50) : error C3861: 'myAnalysisPlugin': identifier not found
myAnalysisPlugin.cpp
..\plugin\myAnalysisPlugin.cpp(56) : error C2653: 'myAnalysisPlugin' : is not a class or namespace name
..\plugin\myAnalysisPlugin.cpp(56) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
Build log was saved at "file://c:\OpenSimPlugin\pluginBuild\osimPlugin.dir\Release\BuildLog.htm"
Libraries - osimPlugin - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
I've attached a link to a video of the whole process here if that's any help.
http://screencast.com/t/yZjV5Br3M42J
And here's an image of the files in my "plugin" folder
http://screencast.com/t/xNiDcHXbPii
I'm not sure where the error is -- I've gone through the other forum posts but haven't been able to figure it out from any of those posts.
Thanks a bunch,
adila
p.s. I replaced all the "AnalysisPlugin_Template" terms in the myAnalysisPlugin.h and myAnalysisPlugin.h files prior to doing anything to see if that would fix things (instead of doing a 'search and replace' on the entire solution after opening the OpenSimPlugin.sln solution file like suggested in the guide since that produced zero matches). I'm using CMake 2.6, Microsoft Visual C++ 2008 Express Edition and OpenSim 2.2 (released December 2nd 2010) if that's any help.
p.p.s. Here's the contents of the log file if that's any help:
Build Log Build started: Project: Libraries - osimPlugin, Configuration: Release|Win32
Command Lines Creating temporary file "c:\OpenSimPlugin\pluginBuild\osimPlugin.dir\Release\RSP00000121203152.rsp" with contents
[
/O2 /Ob2 /I "C:\OpenSim2.2\sdk\include" /I "C:\OpenSim2.2\sdk\include\xercesc" /I "C:\OpenSim2.2\sdk\include\SimTK\include" /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "CMAKE_INTDIR=\"Release\"" /D "OSIMPLUGIN_EXPORTS" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MD /Fo"osimPlugin.dir\Release\\" /Fd"C:/OpenSimPlugin/pluginBuild/Release/osimPlugin.pdb" /W3 /c /TP /Zm1000
..\plugin\RegisterTypes_osimPlugin.cpp
..\plugin\myAnalysisPlugin.cpp
]
Creating command line "cl.exe @c:\OpenSimPlugin\pluginBuild\osimPlugin.dir\Release\RSP00000121203152.rsp /nologo /errorReport:prompt"
Output Window Compiling...
RegisterTypes_osimPlugin.cpp
..\plugin\RegisterTypes_osimPlugin.cpp(50) : error C3861: 'myAnalysisPlugin': identifier not found
myAnalysisPlugin.cpp
..\plugin\myAnalysisPlugin.cpp(56) : error C2653: 'myAnalysisPlugin' : is not a class or namespace name
..\plugin\myAnalysisPlugin.cpp(56) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
Results Build log was saved at "file://c:\OpenSimPlugin\pluginBuild\osimPlugin.dir\Release\BuildLog.htm"
Libraries - osimPlugin - 3 error(s), 0 warning(s)
I've been having some trouble trying to build an OpenSim plugin. I've been following the directions in the Developer's guide (Chapter 3: Creating Your Own Analysis) and I've also checked around in the forum pages, but I haven't been able to find anything helpful. I've managed to go through steps 1 through 4 (Prepare a working directory --> Rename Template --> Run CMake --> Open the solution file OsimPlugin.sln), but every time I try and build my solution, I get this error message in Visual Studio:
------ Build started: Project: Libraries - osimPlugin, Configuration: Release Win32 ------
Compiling...
RegisterTypes_osimPlugin.cpp
..\plugin\RegisterTypes_osimPlugin.cpp(50) : error C3861: 'myAnalysisPlugin': identifier not found
myAnalysisPlugin.cpp
..\plugin\myAnalysisPlugin.cpp(56) : error C2653: 'myAnalysisPlugin' : is not a class or namespace name
..\plugin\myAnalysisPlugin.cpp(56) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
Build log was saved at "file://c:\OpenSimPlugin\pluginBuild\osimPlugin.dir\Release\BuildLog.htm"
Libraries - osimPlugin - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
I've attached a link to a video of the whole process here if that's any help.
http://screencast.com/t/yZjV5Br3M42J
And here's an image of the files in my "plugin" folder
http://screencast.com/t/xNiDcHXbPii
I'm not sure where the error is -- I've gone through the other forum posts but haven't been able to figure it out from any of those posts.
Thanks a bunch,
adila
p.s. I replaced all the "AnalysisPlugin_Template" terms in the myAnalysisPlugin.h and myAnalysisPlugin.h files prior to doing anything to see if that would fix things (instead of doing a 'search and replace' on the entire solution after opening the OpenSimPlugin.sln solution file like suggested in the guide since that produced zero matches). I'm using CMake 2.6, Microsoft Visual C++ 2008 Express Edition and OpenSim 2.2 (released December 2nd 2010) if that's any help.
p.p.s. Here's the contents of the log file if that's any help:
Build Log Build started: Project: Libraries - osimPlugin, Configuration: Release|Win32
Command Lines Creating temporary file "c:\OpenSimPlugin\pluginBuild\osimPlugin.dir\Release\RSP00000121203152.rsp" with contents
[
/O2 /Ob2 /I "C:\OpenSim2.2\sdk\include" /I "C:\OpenSim2.2\sdk\include\xercesc" /I "C:\OpenSim2.2\sdk\include\SimTK\include" /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "CMAKE_INTDIR=\"Release\"" /D "OSIMPLUGIN_EXPORTS" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MD /Fo"osimPlugin.dir\Release\\" /Fd"C:/OpenSimPlugin/pluginBuild/Release/osimPlugin.pdb" /W3 /c /TP /Zm1000
..\plugin\RegisterTypes_osimPlugin.cpp
..\plugin\myAnalysisPlugin.cpp
]
Creating command line "cl.exe @c:\OpenSimPlugin\pluginBuild\osimPlugin.dir\Release\RSP00000121203152.rsp /nologo /errorReport:prompt"
Output Window Compiling...
RegisterTypes_osimPlugin.cpp
..\plugin\RegisterTypes_osimPlugin.cpp(50) : error C3861: 'myAnalysisPlugin': identifier not found
myAnalysisPlugin.cpp
..\plugin\myAnalysisPlugin.cpp(56) : error C2653: 'myAnalysisPlugin' : is not a class or namespace name
..\plugin\myAnalysisPlugin.cpp(56) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
Results Build log was saved at "file://c:\OpenSimPlugin\pluginBuild\osimPlugin.dir\Release\BuildLog.htm"
Libraries - osimPlugin - 3 error(s), 0 warning(s)