[vc6++ + dsound] unresolved external symbol

Pagina: 1
Acties:
  • 68 views sinds 30-01-2008

  • Unicron
  • Registratie: November 2001
  • Laatst online: 17-08 23:04
Hoi,

Ik ben aan het oefenen met directsound om zo de microfoon te kunnen gebruiken, maar ik krijg bij het linken de volgende melding:
dstestDlg.obj : error LNK2001: unresolved external symbol _DSDEVID_DefaultVoiceCapture

ik gebruik dit in de volgende functie:
C++:
1
2
3
4
5
6
7
8
9
10
void CDstestDlg::OnTest() 
{
    // TODO: Add your control notification handler code here
    LPDIRECTSOUND8 lpDSMic;
    //LPDIRECTSOUNDBUFFER8 lpDSMicBuffer;
    LPGUID pGuidMic = NULL;
    GetDeviceID(&DSDEVID_DefaultVoiceCapture, pGuidMic);
    DirectSoundCreate8(pGuidMic,&lpDSMic,NULL);
    //lpDSMic->SetCooperativeLevel();
}



de dingen die ik al geprobeerd heb zijn:
- Gecontroleerd dat ik dsound.lib bij de settings van de linker heb staan.
- Gecontroleerd bij Tools->options->directories dat er eerst wordt gekeken in de lib map van dx9sdk.
- Ik include ook dsound.h

Wie weet de oplossing?

  • .oisyn
  • Registratie: September 2000
  • Laatst online: 12:02

.oisyn

Moderator Devschuur®

Demotivational Speaker

Even de docs lezen he
Linking with GUIDs
Direct3D uses globally unique identifiers (GUIDs) to identify parts of the interface. When you use the IUnknown::QueryInterface method to determine whether an object supports an interface, you identify the interface you're interested in by using its GUID.

To use GUIDs in a DirectX 9.0 application, include a link to the Dxguid.lib library and remove "#define INITGUID" from all your header files and source files. This is a change from previous versions, where GUIDs were linked by defining INITGUID prior to all other include and define statements. In the older versions, INITGUID needed to be defined in only one of your source modules.

Note that you use GUIDs differently depending on whether your application is written in C or C++. In C, you pass a pointer to the GUID (&IID_IDirect3D, for example), but in C++, you pass a reference to it (IID_IDirect3D).
(Introduction to DirectX 9.0 -> Using the DirectX SDK -> Programming DirectX with C/C++ -> Compiling DirectX Samples and Other DirectX Applications)

[ Voor 30% gewijzigd door .oisyn op 21-11-2003 20:18 ]

Give a man a game and he'll have fun for a day. Teach a man to make games and he'll never have fun again.


Dit topic is gesloten.