Skip to main content
gamedev.net
🔒 Locked

Linking Errors

Started by Mattman 2 replies 750+ views
Original Post
Mattman
Mattman
Okay, so I''m working on a sound engine for a game project, and I''m receiving some linking errors. I modeled my sound engine off one of the samples included with the DXSDK, and I''ve included all the headers they did in addition to linking all the library files that were linked in Microsoft''s sample. Why am I getting the linking errors? If you''re interested in the errors I''m getting, they''re as follows: --------------------Configuration: RoR Client - Win32 Debug-------------------- Linking... SoundEngine.obj : error LNK2001: unresolved external symbol "public: long __thiscall CSoundManager::Initialize(struct HWND__ *,unsigned long,unsigned long,unsigned long,unsigned long)" (?Initialize@CSoundManager@@QAEJPAUHWND__@@KKKK@Z) SoundEngine.obj : error LNK2001: unresolved external symbol "public: __thiscall CSoundManager::CSoundManager(void)" (??0CSoundManager@@QAE@XZ) SoundEngine.obj : error LNK2001: unresolved external symbol "public: __thiscall CSoundManager::~CSoundManager(void)" (??1CSoundManager@@QAE@XZ) SoundEngine.obj : error LNK2001: unresolved external symbol "public: __thiscall CWaveFile::~CWaveFile(void)" (??1CWaveFile@@QAE@XZ) SoundEngine.obj : error LNK2001: unresolved external symbol "public: long __thiscall CWaveFile::Close(void)" (?Close@CWaveFile@@QAEJXZ) SoundEngine.obj : error LNK2001: unresolved external symbol "public: long __thiscall CWaveFile::Open(char *,struct tWAVEFORMATEX *,unsigned long)" (?Open@CWaveFile@@QAEJPADPAUtWAVEFORMATEX@@K@Z) SoundEngine.obj : error LNK2001: unresolved external symbol "public: __thiscall CWaveFile::CWaveFile(void)" (??0CWaveFile@@QAE@XZ) SoundEngine.obj : error LNK2001: unresolved external symbol "public: long __thiscall CSound:lay(unsigned long,unsigned long)" (?Play@CSound@@QAEJKK@Z) SoundEngine.obj : error LNK2001: unresolved external symbol "public: long __thiscall CSoundManager::Create(class CSound * *,char *,unsigned long,struct _GUID,unsigned long)" (?Create@CSoundManager@@QAEJPAPAVCSound@@PADKU_GUID@@K@Z) Debug/RoR Client.exe : fatal error LNK1120: 9 unresolved externals Error executing link.exe. RoR Client.exe - 10 error(s), 0 warning(s) Thanks in advance for the help HELP ME!
monkey-poop
monkey-poop
I''m not completely sure if this will work or not, but try going to Tools->Options->Directories in MSVC++ and putting the DirectX include and lib directories at the top of the list.
Mattman
Mattman
Hey, thanks for the reply. That wasn''t the problem...it turns out that the dsutil.cpp file that I needed wasn''t automatically included into my project when I included dsutil.h. Unfortunately, I now get other linking errors when I try to declare an object of my class type...it says that a structure has already been declared, even though it''s a custom structure/type name and I even included "#ifndef" and "#define" stuff in my header file.....odd.....

HELP ME!
Psybr
Psybr
it seems like youre missing some .lib files. other times, i may include certain files twice, which also leads to linking errors.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.