I am trying to use the Play Sound function , but I am getting this error : unresolved external symbol __imp__PlaySoundA@12 referenced in function _main
I am nto sure what to do with this. I am using .Net C++
Van
I am trying to use the Play Sound function , but I am getting this error : unresolved external symbol __imp__PlaySoundA@12 referenced in function _main
I am nto sure what to do with this. I am using .Net C++
Van
You need to ensure that you have linked the library winmm.lib and included the header mmsystem.h.
"Queen and huntress, chaste and fair,
Now the sun is laid to sleep,
Seated in thy silver chair,
State in wonted manner keep."
I have included mmsystem.h but how do I link the .lib file. I can't figure that part out. I am using MS Visual Studio .NET
Van
You could try
Works with MSVC++ 6.0, dont know about .NETCode:#pragma comment(lib,"winmm.lib")
Go to "Project" menu and select "Settings"( or press ALT+F7). Then select "Link" tab and write your lib thing in "object/library modules" edit-box.
That's it
C++ rulez!!!
I don't have a selection for Settings under Project. I have Add Class, Add Resource, Add New Item, Add Existing Item, New Folder and something else. Maybe it is different in MSVS .Net, I will look some more.
Van
Travis Dane, the pragma comment worked. Thanks Can you explain what pragma is?
Van
Well, its something that asures compatibility with other c++
IDE's,so that link settings can be done from the source and
not from a menu in the IDE wich another IDE has different.
(i think )
I'll have to mess around with this now