salut,

je teste actuellement VS 2010, et je voudrais faire un petit projet d' exemple:

Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <QtGui/QApplication>
#include <QtGui/QPushButton>
 
int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
 
	QPushButton bouton("Quitter");
	bouton.show();
 
	QObject::connect(&bouton, SIGNAL(clicked()), &app, SLOT(quit()));
 
	return app.exec();
}
je pr�cise que j'ai compil� la partie debug de Qt (mais bien?), et que je suis sous windows vista.

j'ai ajout� dans les propri�t�s du projet (qui est du type "empty project" sous VS) les chemins
include => c:/Qt/4.5.1/include
exe => c:/Qt/4.5.1/bin
lib => c:/Qt/4.5.1/lib

j'ai bien l'autocompletion dans le projet (super avec la prise en charge de Qt), mais au moment de compiler j'ai l'erreur suivante :

1>------ Build started: Project: test_cpp_2, Configuration: Debug Win32 ------
1>Build started 02/06/2009 15:37:35.
1>_PrepareForBuild:
1> Creating directory "Debug\".
1> Creating "Debug\lastbuild.timestamp" because "AlwaysCreate" was specified.
1>PrepareForBuild:
1> Creating directory "C:\Users\lolveley\Documents\Visual Studio 10\Projects\test_cpp_2\Debug\".
1>ClCompile:
1> fichier_cpp_1.cpp
1>FileTracker : warning : Attempt to load UI satellite dll from C:\Windows\Microsoft.NET\Framework\v4.0.20506\1036\FileTrackerUI.dll failed.
1>FileTracker : warning : Attempt to load UI satellite dll from C:\Windows\Microsoft.NET\Framework\v4.0.20506\1036\TrackerUI.dll failed.
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QApplication::~QApplication(void)" (__imp_??1QApplication@@UAE@XZ) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QPushButton::~QPushButton(void)" (__imp_??1QPushButton@@UAE@XZ) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec@QApplication@@SAHXZ) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl QObject::connect(class QObject const *,char const *,class QObject const *,char const *,enum Qt::ConnectionType)" (__imp_?connect@QObject@@SA_NPBV1@PBD01W4ConnectionType@Qt@@@Z) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) char const * __cdecl qFlagLocation(char const *)" (__imp_?qFlagLocation@@YAPBDPBD@Z) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWidget::show(void)" (__imp_?show@QWidget@@QAEXXZ) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::~QString(void)" (__imp_??1QString@@QAE@XZ) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QPushButton::QPushButton(class QString const &,class QWidget *)" (__imp_??0QPushButton@@QAE@ABVQString@@PAVQWidget@@@Z) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(char const *)" (__imp_??0QString@@QAE@PBD@Z) referenced in function _main
1>fichier_cpp_1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QApplication::QApplication(int &,char * *,int)" (__imp_??0QApplication@@QAE@AAHPAPADH@Z) referenced in function _main
1>C:\Users\lolveley\Documents\Visual Studio 10\Projects\test_cpp_2\Debug\test_cpp_2.exe : fatal error LNK1120: 10 unresolved externals
1>FileTracker : warning : Attempt to load UI satellite dll from C:\Windows\Microsoft.NET\Framework\v4.0.20506\1036\FileTrackerUI.dll failed.
1>FileTracker : warning : Attempt to load UI satellite dll from C:\Windows\Microsoft.NET\Framework\v4.0.20506\1036\TrackerUI.dll failed.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.00
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
je ne suis pas s�r que la compil se soit bien pass�e; r�pondez-moi m�me si vous pensez que l'erreur vient de l�, je porterai plus d'attention � cela alors.

olivier.