Erreur d'execution

bilaloch Messages postés 556 Date d'inscription lundi 6 octobre 2003 Statut Membre Dernière intervention 31 octobre 2019 - 3 août 2006 à 12:50
bilaloch Messages postés 556 Date d'inscription lundi 6 octobre 2003 Statut Membre Dernière intervention 31 octobre 2019 - 5 août 2006 à 14:34
Bonjour a tous,

J'ai un ptit probleme d'execution, pas de compilation. Je travaille sous VC++ 2005 Express. Lorsque j'execute, il compile sans erreurs, mais arrivé a l'execution il  a des erreurs de linker :


1>------ Début de la génération : Projet : dx9_initialization, Configuration : Debug Win32 ------


1>Compilation en cours...


1>dx9_initialization.cpp


1>Édition des liens en cours...


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__UnregisterClassA@8 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__DispatchMessageA@4 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__TranslateMessage@4 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__PeekMessageA@20 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__UpdateWindow@4 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__ShowWindow@8 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__CreateWindowExA@48 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__RegisterClassExA@4 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__GetStockObject@4 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__LoadCursorA@8 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__LoadIconA@8 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu _memset référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu @_RTC_CheckStackVars@8 référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __RTC_CheckEsp référencé dans la fonction _WinMain@16


1>dx9_initialization.obj : error LNK2001: symbole externe non résolu __RTC_Shutdown


1>dx9_initialization.obj : error LNK2001: symbole externe non résolu __RTC_InitBase


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__DefWindowProcA@16 référencé dans la fonction "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu __imp__PostQuitMessage@4 référencé dans la fonction "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)


1>dx9_initialization.obj : error LNK2019: symbole externe non résolu _Direct3DCreate9@4 référencé dans la fonction "void __cdecl init(void)" (?init@@YAXXZ)


1>dx9_initialization.obj : error LNK2001: symbole externe non résolu __fltused


1>LINK : error LNK2001: symbole externe non résolu _WinMainCRTStartup


1>.\Debug/dx9_initialization.exe : fatal error LNK1120: 21 externes non résolus


1>Création d'un fichier d'informations de consultation...


1>Microsoft Browse Information Maintenance Utility Version 8.00.50727


1>Copyright (C) Microsoft Corporation. All rights reserved.


1>Le journal de génération a été enregistré à l'emplacement "file://c:\Documents and Settings\Hamza.CHAWKI.000\Mes documents\Programmation\Programmation directx\dx9_initialization\dx9_initialization\Debug\BuildLog.htm"


1>dx9_initialization - 22 erreur(s), 0 avertissement(s)


======== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

Voila... Toutes les idées sont la bienvenue ^^ . Je crois que c'est une option du compilo. Je precise que j'ai installé le PSDK et le DirectX 9.0 SDK, et que j'ai ajouté leurs includes et leurs librairies (enfin... je pense).

5 réponses

SAKingdom Messages postés 3212 Date d'inscription lundi 7 novembre 2005 Statut Membre Dernière intervention 16 février 2009 15
3 août 2006 à 15:11
"symbole externe non résolu"
Il ne trouve pas la librairie. Même si tu as inclue les librairies, as tu inclue les chemins d'acces des dossiers include et lib de la PSDK et DXSDK dans les options du compilateur?

Ou tu peux t'être trompé de projet. Tu as pu par accident créé un projet .NET à la place de Win32.

C++ (@++)
___________________________________________
Les plus grands esprits trouvent toujours une solution

0
bilaloch Messages postés 556 Date d'inscription lundi 6 octobre 2003 Statut Membre Dernière intervention 31 octobre 2019 1
3 août 2006 à 15:27
Non. En fait, j'ai bien mis tous les dossiers "include" et "lib" ( et meme tous les dossiers la dedans ^^ ), et ce n'est pas "mon" projet, mais un projet telechargé sur http://www.codesampler.com/dx9src/dx9src_1.htm#dx9_initialization . Ce n'est pas un projet de la version 2005 de VC++, donc j'ai dû le convertir. Est il possible que le probleme vienne de la ( si oui, comment y remedier ? ) ?? J'ai recherché sur google et partout sur le web ( ou presque ^^ ), je ne vois vraiment pas comment je pourrais corriger ce probleme.

Merci quand meme,

BILALoch
0
nightlord666 Messages postés 746 Date d'inscription vendredi 17 juin 2005 Statut Membre Dernière intervention 23 mai 2007 10
4 août 2006 à 21:29
Rajoute ces deux lignes, ça devrait marcher :
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "gdi32.lib")

//Libère ma mémoire que j'ai utilisé
this->GetCurrentConversation()->FreeAllocatedMemory(REASON_UNUSED);
0
nightlord666 Messages postés 746 Date d'inscription vendredi 17 juin 2005 Statut Membre Dernière intervention 23 mai 2007 10
4 août 2006 à 21:34
Et pour information, ce n'est pas une erreur à l'exécution mais à la phase d'édition de liens, ou linkage.

//Libère ma mémoire que j'ai utilisé
this->GetCurrentConversation()->FreeAllocatedMemory(REASON_UNUSED);
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
bilaloch Messages postés 556 Date d'inscription lundi 6 octobre 2003 Statut Membre Dernière intervention 31 octobre 2019 1
5 août 2006 à 14:34
Ok, merci de la precision. Apres avoir copier/coller tes deux lignes de code, il y a toujours un bug qui persiste.


1>------ Début de la génération : Projet : Test_Cube01, Configuration : Debug Win32 ------


1>Édition des liens en cours...


1>LINK : fatal error LNK1104: impossible d'ouvrir le fichier 'd3dx9dt.lib'


1>Le journal de génération a été enregistré à l'emplacement "file://c:\Documents and Settings\Hamza.CHAWKI.000\Mes documents\Programmation\cppfrance_source_38267\Test_Cube01\Debug\BuildLog.htm"


1>Test_Cube01 - 1 erreur(s), 0 avertissement(s)


======== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

 J'ai lu que cette librairie n'etait obligatoire que pour le mode debug en faisant une petite recherche. J'ai donc mis le mode release, et voila les autres bugs :


1>------ Début de la génération : Projet : Test_Cube01, Configuration : Release Win32 ------


1>Édition des liens en cours...


1>Fonctions_Utiles.obj : error LNK2019: symbole externe non résolu _D3DXCreateFontA@48 référencé dans la fonction "public: long __thiscall Gestion_Texte::InitFont(struct IDirect3DDevice9 *)" (?InitFont@Gestion_Texte@@QAEJPAUIDirect3DDevice9@@@Z)


1>Fonctions_Utiles.obj : error LNK2019: symbole externe non résolu __imp__ReleaseDC@8 référencé dans la fonction "public: long __thiscall Gestion_Texte::InitFont(struct IDirect3DDevice9 *)" (?InitFont@Gestion_Texte@@QAEJPAUIDirect3DDevice9@@@Z)


1>Fonctions_Utiles.obj : error LNK2019: symbole externe non résolu __imp__MulDiv@12 référencé dans la fonction "public: long __thiscall Gestion_Texte::InitFont(struct IDirect3DDevice9 *)" (?InitFont@Gestion_Texte@@QAEJPAUIDirect3DDevice9@@@Z)


1>Fonctions_Utiles.obj : error LNK2019: symbole externe non résolu __imp__GetDeviceCaps@8 référencé dans la fonction "public: long __thiscall Gestion_Texte::InitFont(struct IDirect3DDevice9 *)" (?InitFont@Gestion_Texte@@QAEJPAUIDirect3DDevice9@@@Z)


1>Fonctions_Utiles.obj : error LNK2019: symbole externe non résolu __imp__GetDC@4 référencé dans la fonction "public: long __thiscall Gestion_Texte::InitFont(struct IDirect3DDevice9 *)" (?InitFont@Gestion_Texte@@QAEJPAUIDirect3DDevice9@@@Z)


1>Fonctions_Utiles.obj : error LNK2019: symbole externe non résolu __imp__SetRect@20 référencé dans la fonction "public: void __thiscall Gestion_Texte::DrawTextA(int,char *,unsigned long)" (?DrawTextA@Gestion_Texte@@QAEXHPADK@Z)


1>Test_Cube01.obj : error LNK2001: symbole externe non résolu __fltused


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu _D3DXMatrixMultiply@12 référencé dans la fonction "public: struct D3DXMATRIX __thiscall D3DXMATRIX::operator*(struct D3DXMATRIX const &)const " (??DD3DXMATRIX@@QBE?AU0@ABU0@@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__EndPaint@8 référencé dans la fonction "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__GetClientRect@8 référencé dans la fonction "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__BeginPaint@8 référencé dans la fonction "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__DefWindowProcA@16 référencé dans la fonction "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__PostQuitMessage@4 référencé dans la fonction "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu ___security_cookie référencé dans la fonction "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu @__security_check_cookie@4 référencé dans la fonction "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu _D3DXLoadMeshFromXA@32 référencé dans la fonction "void __cdecl Init_Objet(void)" (?Init_Objet@@YAXXZ)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu _D3DXMatrixPerspectiveFovLH@20 référencé dans la fonction "void __cdecl Init_Objet(void)" (?Init_Objet@@YAXXZ)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu _Direct3DCreate9@4 référencé dans la fonction "void __cdecl Init_Objet(void)" (?Init_Objet@@YAXXZ)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu _memset référencé dans la fonction "void __cdecl Init_Objet(void)" (?Init_Objet@@YAXXZ)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu _D3DXMatrixRotationYawPitchRoll@16 référencé dans la fonction "void __cdecl Rotation_Cube(float)" (?Rotation_Cube@@YAXM@Z)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu _D3DXMatrixTranslation@16 référencé dans la fonction "void __cdecl Rendu_Objet(void)" (?Rendu_Objet@@YAXXZ)


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__timeGetTime@0 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__DispatchMessageA@4 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__TranslateMessage@4 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__PeekMessageA@20 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__UpdateWindow@4 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__ShowWindow@8 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__CreateWindowExA@48 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__RegisterClassExA@4 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__GetStockObject@4 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__LoadCursorA@8 référencé dans la fonction _WinMain@16


1>Test_Cube01.obj : error LNK2019: symbole externe non résolu __imp__LoadIconA@8 référencé dans la fonction _WinMain@16


1>LINK : error LNK2001: symbole externe non résolu _WinMainCRTStartup


1>Release/Test_Cube01.exe : fatal error LNK1120: 33 externes non résolus


1>Le journal de génération a été enregistré à l'emplacement "file://c:\Documents and Settings\Hamza.CHAWKI.000\Mes documents\Programmation\cppfrance_source_38267\Test_Cube01\Release\BuildLog.htm"


1>Test_Cube01 - 34 erreur(s), 0 avertissement(s)


======== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========





Il y en a encore plus qu'avant ^^".

Merci de ton aide, j'espere que tu as encore quelques idées ^^ .

BILALoch
0
Rejoignez-nous