CaptureTex9 et erreurs link

Résolu
cs_fenrhyr Messages postés 15 Date d'inscription jeudi 23 septembre 2004 Statut Membre Dernière intervention 5 avril 2005 - 24 sept. 2004 à 16:20
essirc Messages postés 48 Date d'inscription vendredi 23 juillet 2004 Statut Membre Dernière intervention 26 juillet 2005 - 27 sept. 2004 à 15:15
Bonjour à tous,

Aujourd'hui j'ai essayé de compiler le projet CaptureTex9 fourni dans le SDK de directX. Comme ca, pour le fun... entre autres.

Je charge le .dsw dans visual c++ 6.0. Je vérifie mes chemins d'include et de librairie, je ne touche absolument à rien d'autre et zop F5.

Donc à ce moment-là :

--------------------Configuration: CaptureTex9 - Win32 Debug Unicode--------------------
Linking...
LINK : warning LNK4049: locally defined symbol "_strrchr" imported
LINK : warning LNK4049: locally defined symbol "_sprintf" imported
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CBaseFilter::NonDelegatingRelease(void)" (?NonDelegatingRelease@CBaseFilter@@UAGKXZ)
DShowTextures.obj : error LNK2001: unresolved external symbol "void __stdcall DbgAssert(unsigned short const *,unsigned short const *,int)" (?DbgAssert@@YGXPBG0H@Z)
Textures.obj : error LNK2001: unresolved external symbol "void __stdcall DbgAssert(unsigned short const *,unsigned short const *,int)" (?DbgAssert@@YGXPBG0H@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: __thiscall CBaseVideoRenderer::CBaseVideoRenderer(struct _GUID const &,unsigned short *,struct IUnknown *,long *)" (??0CBaseVideoRenderer@@QAE@ABU_GUID@@PAGPAUIUnknown@@PAJ@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol _MEDIASUBTYPE_YUYV
Textures.obj : error LNK2001: unresolved external symbol _CLSID_CaptureGraphBuilder2
Textures.obj : error LNK2001: unresolved external symbol _IID_ICaptureGraphBuilder2
strmbasd.lib(dllsetup.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllsetup.obj) : error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)
Debug_Unicode/CaptureTex9.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.

CaptureTex9.exe - 12 error(s), 2 warning(s)

Je ne panique pas et recherche sur internet. Je vois qu'il serait plus approprié de mettre la librairie strmiids.lib plutot que strmbasd.lib. Je m'execute. F5 et :

ShowTextures.obj : error LNK2001: unresolved external symbol "public: __thiscall CCritSec::CCritSec(void)" (??0CCritSec@@QAE@XZ)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: __thiscall CCritSec::~CCritSec(void)" (??1CCritSec@@QAE@XZ)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCritSec::Lock(void)" (?Lock@CCritSec@@QAEXXZ)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCritSec::Unlock(void)" (?Unlock@CCritSec@@QAEXXZ)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseVideoRenderer::SetSink(struct IQualityControl *)" (?SetSink@CBaseVideoRenderer@@UAGJPAUIQualityControl@@@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseVideoRenderer::Notify(struct IBaseFilter *,struct tagQuality)" (?Notify@CBaseVideoRenderer@@UAGJPAUIBaseFilter@@UtagQuality@@@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseVideoRenderer::get_DevSyncOffset(int *)" (?get_DevSyncOffset@CBaseVideoRenderer@@UAGJPAH@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseVideoRenderer::get_AvgSyncOffset(int *)" (?get_AvgSyncOffset@CBaseVideoRenderer@@UAGJPAH@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseVideoRenderer::get_Jitter(int *)" (?get_Jitter@CBaseVideoRenderer@@UAGJPAH@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseVideoRenderer::get_AvgFrameRate(int *)" (?get_AvgFrameRate@CBaseVideoRenderer@@UAGJPAH@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseVideoRenderer::get_FramesDrawn(int *)" (?get_FramesDrawn@CBaseVideoRenderer@@UAGJPAH@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseVideoRenderer::get_FramesDroppedInRenderer(int *)" (?get_FramesDroppedInRenderer@CBaseVideoRenderer@@UAGJPAH@Z)

.......

Je vous passe les détails, il y a 72 erreurs comme ça.

Quelqu'un aurait-il la gentillesse de me dire ce que je fais de mal svp ?

En vous remerciant,
Fenrhyr

4 réponses

essirc Messages postés 48 Date d'inscription vendredi 23 juillet 2004 Statut Membre Dernière intervention 26 juillet 2005 3
27 sept. 2004 à 15:15
Ah ouais, autant pour moi, c'est vrai qu'il faut compiler les .lib. J'y pensais plus.

Bonne continuation

essirc
3
essirc Messages postés 48 Date d'inscription vendredi 23 juillet 2004 Statut Membre Dernière intervention 26 juillet 2005 3
24 sept. 2004 à 17:41
Salut,

Dans ta configuration initiale, vérifies que tu as bien les chemins suivants :

- dans "Additional include directories" (Project settings, C/C++, preprocessor) :

<chemin install directx>\Samples\C++\DirectShow\BaseClasses
<chemin install directx>\Include

- dans "Object/Library Modules" (Project settings, Link, General):

<chemin install directx>\Samples\C++\DirectShow\BaseClasses\debug\strmbasd.lib quartz.lib vfw32.lib winmm.lib

Voilà, le filtre devrait compiler.

Bon courage
0
cs_fenrhyr Messages postés 15 Date d'inscription jeudi 23 septembre 2004 Statut Membre Dernière intervention 5 avril 2005
27 sept. 2004 à 09:36
Bouhouhou...

Ca marche paaaaaaas :sad)

- dans "Additional include directories" (Project settings, C/C++, preprocessor), j'ai bien mis :
C:\DXSDK\Samples\C++\DirectShow\BaseClasses,C:\DXSDK\Include

- dans "Object/Library Modules" (Project settings, Link, General), j'ai bien mis:
C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Debug_Unicode\strmbasd.lib quartz.lib vfw32.lib winmm.lib d3dx9.lib d3d9.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /stack:0x200000,0x200000 /subsystem:windows /incremental:yes /pdb:"Debug_Unicode/CaptureTex9.pdb" /debug /machine:I386 /out:"Debug_Unicode/CaptureTex9.exe" /pdbtype:sept /libpath:"..\..\..\..\..\lib"

Et j'ai toujours :
--------------------Configuration: CaptureTex9 - Win32 Debug Unicode--------------------
Compiling...
DShowTextures.cpp
Textures.cpp
Linking...
LINK : warning LNK4049: locally defined symbol "_strrchr" imported
LINK : warning LNK4049: locally defined symbol "_sprintf" imported
DShowTextures.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CBaseFilter::NonDelegatingRelease(void)" (?NonDelegatingRelease@CBaseFilter@@UAGKXZ)
DShowTextures.obj : error LNK2001: unresolved external symbol "void __stdcall DbgAssert(unsigned short const *,unsigned short const *,int)" (?DbgAssert@@YGXPBG0H@Z)
Textures.obj : error LNK2001: unresolved external symbol "void __stdcall DbgAssert(unsigned short const *,unsigned short const *,int)" (?DbgAssert@@YGXPBG0H@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol "public: __thiscall CBaseVideoRenderer::CBaseVideoRenderer(struct _GUID const &,unsigned short *,struct IUnknown *,long *)" (??0CBaseVideoRenderer@@QAE@ABU_GUID@@PAGPAUIUnknown@@PAJ@Z)
DShowTextures.obj : error LNK2001: unresolved external symbol _MEDIASUBTYPE_YUYV
Textures.obj : error LNK2001: unresolved external symbol _CLSID_CaptureGraphBuilder2
Textures.obj : error LNK2001: unresolved external symbol _IID_ICaptureGraphBuilder2
strmbasd.lib(dllsetup.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllsetup.obj) : error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)
Debug_Unicode/CaptureTex9.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.

CaptureTex9.exe - 12 error(s), 2 warning(s)

Y a-t-il encore des choses que j'oublie, ou Murphy s'acharne-t-il sur moi ??

Merci
Fenrhyr
0
cs_fenrhyr Messages postés 15 Date d'inscription jeudi 23 septembre 2004 Statut Membre Dernière intervention 5 avril 2005
27 sept. 2004 à 15:12
Bon, finalement, j'ai trouvé.

J'ai d'abord ouvert le dshow.dsw puis j'ai choisi capturetex9.dsw dedans et j'ai compile.

J'ai donc regarde les .lib nécéssaires.

Fen'
0
Rejoignez-nous