Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectX soundengine

Started by farangtoone Aug 15, 2006 at 10:11 PM 5 replies 1.7k views
Original Post
farangtoone
farangtoone
Dear gamedev, Im programming a soundengine in Visual C++ 2003. I make use of the dsound.lib library and it is included in my project but i keep having this error: ------ Build started: Project: NedsCopy, Configuration: Debug Win32 ------ Linking... NedsCopy.obj : error LNK2019: unresolved external symbol "public: void __thiscall CSoundManager::clear(void)" (?clear@CSoundManager@@QAEXXZ) referenced in function "public: __thiscall CSoundManager::~CSoundManager(void)" (??1CSoundManager@@QAE@XZ) LIBCD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup Debug/NedsCopy.exe : fatal error LNK1120: 2 unresolved externals Build log was saved at "file://c:\Documents and Settings\Toone\My Documents\Visual Studio Projects\NedsCopy\Debug\BuildLog.htm" NedsCopy - 3 error(s), 0 warning(s) ---------------------- Done ---------------------- Build: 0 succeeded, 1 failed, 0 skipped Is there anyone who knows how to solve this? Thanks in advance!! Toone
Morpheus011
Morpheus011
you either haven't defined the clear function you're calling in your CSoundManager 's destructor, or your application doesn't know how to find it.
farangtoone
farangtoone
Morpheus001,

This is my destructor:


CSoundManager::~CSoundManager(){
if(!m_bOperational)return;
clear();
(void)m_lpDirectSound->Release();
}




I must say that I am quite a beginner. Is this correct or is it your second thought that my program can't find it?

Toone

farangtoone
farangtoone
indeed he couldnt find it, i was having trouble with different files ..

now i get following error:



------ Build started: Project: NedsCopy, Configuration: Debug Win32 ------

Compiling...
NedsCopy.cpp
Linking...
NedsCopy.obj : error LNK2019: unresolved external symbol "public: __thiscall CSoundManager::CSoundManager(struct HWND__ *)" (??0CSoundManager@@QAE@PAUHWND__@@@Z) referenced in function _WinMain@16
LIBCD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
Debug/NedsCopy.exe : fatal error LNK1120: 2 unresolved externals

Build log was saved at "file://c:\Documents and Settings\Toone\My Documents\Visual Studio Projects\NedsCopy\Debug\BuildLog.htm"
NedsCopy - 3 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped





Is there something wrong with my main then?
Thanks in advance ..
Endurion
Endurion
There two things in that error log:

NedsCopy.obj : error LNK2019: unresolved external symbol "public: __thiscall CSoundManager::CSoundManager(struct HWND__ *)" (??

The line above hints to a missing constructor code for CSoundManager that takes a HWND as parameter.

0CSoundManager@@QAE@PAUHWND__@@@Z) referenced in function _WinMain@16
LIBCD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup

The line above hints that you have a WinMain function, but the project was created with a main function as startup. Did you accidentally create a console project instead of a Win32 app?


Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>
farangtoone
farangtoone
Hi guys,

I have found the solution. Instead of trying to reduce all the errors I have restarted my program... Re-programmed

The problem was that i wanted to use a part of my code as a lib file but i hadn't made it yet .. Starting with a new project often makes things more clear


Thanks anyway!!

Topic Locked

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

Sign in to reply to this topic.