Fixing "error C2065: undeclared identifier"
First off, I'm completely out of my depth here. So the question might be the wrong one to ask, but here goes...
As per the accepted answer to this question, I'm trying to compile the bindings for the Audiere library, which are produced by Harald Fielker and available in the mailing list archives.
I've opened the .vcproj file in VC++ Express Edition and it converted it to a solution it could use. I've then gone into th开发者_JS百科e properties and added:
"C:\Documents and Settings\tdw20\My Documents\audiere-win32\include" to the additional include directories
"C:\Documents and Settings\tdw20\My Documents\Downloads\audiere-win32\lib" to the additional library directories
Yet I still get "undeclared identifier" errors. The full output is listed on pastebin.
Does anyone have any idea what might be wrong?
I can only start to guess, but are you sure the header files are where you anticipate them to be?
The OutputStream
class referenced in outputstream.cpp isn't being recognised. As far as i can tell it's defined in the audiere.h header file in the audiere project, and the #include
directive at line 2 of outputstream.cpp should be including that file.
Two things to try in VC++:
- In line 8 of outputstream.cpp double-click on
OutputStream
and then right-click, and on the context menu select Go To Definition. See what file it opens (if any). - Right-click line 2 (
#include <audiere.h>
) and select Open Document.... Again see if it opens a file.
Actually, just realied you said you added C:\Documents and Settings\tdw20\My Documents\audiere-win32\include to the include but it looks to me like audiere.h is in a src sub-directory of audiere. Also the path you specified for the libs is inconsistent - it has an extra Downloads dir in the path. Are both these paths definitely correct? The dir you add to the include path should contain header files such as audiere.h and the dir for the libs should contain .lib files.
You shouldn't need to compile outputstream.cpp for the C# binding's libaudieresharpglue.dll. Did you download Audiere 1.9.4 Win32 binary release? I actually encountered an issue where I downloaded an old version of Audiere from 2002, I think, and it gave me a ton of trouble until I realized I had the wrong version.
The only source file you should need to worry about is include/audiere.h
. You'll link against lib/audiere.lib
, and at runtime your application will need to access bin/audiere.dll
(which should probably be moved to your executable's directory, on on the DLL path, when you run your executable).
精彩评论