views:

13

answers:

1

Hi all:

i wrote this simple programme which did not pass the compiling phase using vs2008 IDE while it is successfully built using qt-creator.

#include <QtGui/QApplication>
#include <QtGui>

int main(int argc, char *argv[])
{
 QApplication a(argc, argv);
 QPushButton w;
 w.show();

 return a.exec();
}

The error info is listed below:

1 fatal error C1083: can not open the included file:“QtGui/QApplication”: No such file or directory

Some notes about my problem:

  1. I have the qt libs compiled by msvc2008 for windows installed.
  2. In addition, i have patched the sp1 of vs2008
  3. Finally i have installed the Qt Addin 1.1.5 and configure it correctly
  4. I have tried to add G:\Qt\4.6.3VS\include\QtGui to vc++ include directory,which did not work either.

Is this a rare seen problem ? Thanks for any hints .

A: 

try to add G:\Qt\4.6.3VS\include as include directory

bobrik
i did that as you suggested,but i got linker error like error LNK2019: unresolved external symbol _WinMain@16referenced in function ___tmainCRTStartup.
Tracy
google around , i found a so-called solution which is that i need to change linker-system-subsystem to /SUBSYSTEM:CONSOLE.Now the programme work,however,i got an console window accompanied. How can i run the qt application without seeing this console
Tracy