sankar
10th February 2011, 04:29
1. Installed VS2008 completely.
2. Installed QT 4.5.0.
3. Tried to setup the following user environment variables,
PATH => C:\Qt\4.5.0\bin
QMAKESPEC => win32-msvc2008
QTDIR => C:\Qt\4.5.0
4. Tried sample HelloWorld program as shown below,
a. Created a hello folder
b. Created hello.cpp and copied the following code into it,
/************************************************** ****/
// HelloWorld
/************************************************** ****/
#include <QApplication>
#include <QLabel>
int main(int arg c, char* argv[])
{
QApplication app(argc, arv);
QLabel *myLabel = new QLabel("Hello World");
myLabel->show();
return app.exec();
}
/************************************************** ****/
c. From command prompt, changed the directory to hello, and type qmake -project to create a platform-independent project file (hello.pro). hello.pro file is created successfully.
d. Ran qmake hello.pro, to create a platform-specific makefile from the project file. But it throws the following error,
C:\Qt Samples\hello>qmake hello.pro
Error processing meta file: c:\Qt\4.5.0\lib\qtmain
Error processing meta file: c:\Qt\4.5.0\lib\qtmaind
Error processing meta file: c:\Qt\4.5.0\lib\qtmain
5. Then tried HelloWorld progam from VisualStudio as shown below,
a. First added QT path in VC++ Directories
Executables - $(QTDIR)\bin
Include - $(QTDIR)\include
Lib - $(QTDIR)\lib
Source - $(QTDIR)\src
b. Created a new project (File-> New-> Project-> General-> Makefile Project) named HelloQt.
Then modified configuration settings as given below,
Go to Project-> Properties-> Configuration Properties-> Nmake and enter the following in the build command line qmake -project && qmake && nmake release-all. Also enter release\HelloQt.exe in the Output field.
c. Added HelloQt.cpp and copied the above HelloWorld program.
d. Tried to build it, but it throws the following error,
/************************************************** ****************************************/
// Build Output window
/************************************************** ****************************************/
1>------ Build started: Project: HelloQt, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>Error processing meta file: c:\Qt\4.5.0\lib\qtmain
1>Error processing meta file: c:\Qt\4.5.0\lib\qtmaind
1>Error processing meta file: c:\Qt\4.5.0\lib\qtmain
1>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
1>Copyright (C) Microsoft Corporation. All rights reserved.
1> "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile.Release all
1>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
1>Copyright (C) Microsoft Corporation. All rights reserved.
1> cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GL -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\4.5.0\include\QtCore" -I"c:\Qt\4.5.0\include\QtGui" -I"c:\Qt\4.5.0\include" -I"." -I"c:\Qt\4.5.0\include\ActiveQt" -I"release" -I"." -I"c:\Qt\4.5.0\mkspecs\win32-msvc2008" -Forelease\ @C:\DOCUME~1\1494\LOCALS~1\Temp\nm29.tmp
1>main.cpp
1>c:\Qt\4.5.0\include\QtCore/qconfig.h(1) : fatal error C1083: Cannot open include file: '../../src/corelib/global/qconfig.h': No such file or directory
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.EXE"' : return code '0x2'
1>Stop.
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\nmake.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://e:\Sankar\QT\Samples\HelloQt\HelloQt\Release\Build Log.htm"
1>HelloQt - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
/************************************************** ****************************************/
Thanks & Regards,
Sankar.
2. Installed QT 4.5.0.
3. Tried to setup the following user environment variables,
PATH => C:\Qt\4.5.0\bin
QMAKESPEC => win32-msvc2008
QTDIR => C:\Qt\4.5.0
4. Tried sample HelloWorld program as shown below,
a. Created a hello folder
b. Created hello.cpp and copied the following code into it,
/************************************************** ****/
// HelloWorld
/************************************************** ****/
#include <QApplication>
#include <QLabel>
int main(int arg c, char* argv[])
{
QApplication app(argc, arv);
QLabel *myLabel = new QLabel("Hello World");
myLabel->show();
return app.exec();
}
/************************************************** ****/
c. From command prompt, changed the directory to hello, and type qmake -project to create a platform-independent project file (hello.pro). hello.pro file is created successfully.
d. Ran qmake hello.pro, to create a platform-specific makefile from the project file. But it throws the following error,
C:\Qt Samples\hello>qmake hello.pro
Error processing meta file: c:\Qt\4.5.0\lib\qtmain
Error processing meta file: c:\Qt\4.5.0\lib\qtmaind
Error processing meta file: c:\Qt\4.5.0\lib\qtmain
5. Then tried HelloWorld progam from VisualStudio as shown below,
a. First added QT path in VC++ Directories
Executables - $(QTDIR)\bin
Include - $(QTDIR)\include
Lib - $(QTDIR)\lib
Source - $(QTDIR)\src
b. Created a new project (File-> New-> Project-> General-> Makefile Project) named HelloQt.
Then modified configuration settings as given below,
Go to Project-> Properties-> Configuration Properties-> Nmake and enter the following in the build command line qmake -project && qmake && nmake release-all. Also enter release\HelloQt.exe in the Output field.
c. Added HelloQt.cpp and copied the above HelloWorld program.
d. Tried to build it, but it throws the following error,
/************************************************** ****************************************/
// Build Output window
/************************************************** ****************************************/
1>------ Build started: Project: HelloQt, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>Error processing meta file: c:\Qt\4.5.0\lib\qtmain
1>Error processing meta file: c:\Qt\4.5.0\lib\qtmaind
1>Error processing meta file: c:\Qt\4.5.0\lib\qtmain
1>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
1>Copyright (C) Microsoft Corporation. All rights reserved.
1> "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile.Release all
1>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
1>Copyright (C) Microsoft Corporation. All rights reserved.
1> cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GL -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\4.5.0\include\QtCore" -I"c:\Qt\4.5.0\include\QtGui" -I"c:\Qt\4.5.0\include" -I"." -I"c:\Qt\4.5.0\include\ActiveQt" -I"release" -I"." -I"c:\Qt\4.5.0\mkspecs\win32-msvc2008" -Forelease\ @C:\DOCUME~1\1494\LOCALS~1\Temp\nm29.tmp
1>main.cpp
1>c:\Qt\4.5.0\include\QtCore/qconfig.h(1) : fatal error C1083: Cannot open include file: '../../src/corelib/global/qconfig.h': No such file or directory
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.EXE"' : return code '0x2'
1>Stop.
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\nmake.exe"' : return code '0x2'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://e:\Sankar\QT\Samples\HelloQt\HelloQt\Release\Build Log.htm"
1>HelloQt - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
/************************************************** ****************************************/
Thanks & Regards,
Sankar.