Bonjour à tous,

Etant débutant en Qt, je rencontre des difficultés pour convertir un projet Qt (même très simple) et le compiler en release dans Visual Studio.
J'ai passé énormément de temps à chercher ce qui n'allait pas sans succès...

Par exemple :
Je créé un main tout simple dans "testQt.cpp" et que j'exécute les commandes suivantes dans la console de Visual :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
qmake -project
qmake -tp vc
pour générer le projet VS.

Ensuite j'ouvre le projet et si je compile en mode Debug tout se passe sans problème.
Par contre si je compile en mode Release le message suivant apparait :

"Aucune information de débogage
Les informations de débogage pour 'testQt.exe' sont introuvables ou ne correspondent pas. Le fichier binaire n'a pas été généré avec les informations de débogage.
Voulez-vous continuer le débogage ?
Oui/Non"

Si on répond "Oui" le programme est exécuté et il ne l'est pas si on répond "Non".
Dans tous les cas le .exe est généré et on obtient quelque chose comme ça en sortie :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'testQt.exe'*: Chargé 'C:\Documents and Settings\Patrick\Mes documents\Visual Studio 2010\Projects\testQt\release\testQt.exe', Le fichier binaire n'a pas été généré avec les informations de débogage.
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\Qt\4.7.2\bin\QtGui4.dll', Le fichier binaire n'a pas été généré avec les informations de débogage.
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\user32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\comdlg32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\advapi32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\secur32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\msvcrt.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\shlwapi.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\shell32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\oleaut32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\ole32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\imm32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\winmm.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\winspool.drv', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\Qt\4.7.2\bin\QtCore4.dll', Le fichier binaire n'a pas été généré avec les informations de débogage.
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\ws2_32.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\ws2help.dll', Cannot find or open the PDB file
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\msvcp100.dll', Les symboles ont été chargés.
'testQt.exe'*: Chargé 'C:\WINDOWS\system32\msvcr100.dll', Les symboles ont été chargés.
Le programme '[1452] testQt.exe: Natif' s'est arrêté avec le code 0 (0x0).
Comment peut-on faire disparaitre ce message ?
Le .pdb est bien présent pourtant...

Jusque là j'ai trouvé deux solutions qui n'en sont pas :
Soit aller dans Propriétés de configuration-> Editeur de liens-> Débogage-> Générer des infos de débogage puis mettre Oui (/DEBUG)
ce qui revient à compiler en mode Debug.

Soit le faire en console et bizarrement il n'y a pas de problème :
J'aimerais bien comprendre, c'est assez désespérant !

Merci beaucoup pour votre aide