Hello gamix,
Thanks for your reply. I really appreciate your help. However you are
incorrect in thinking that I am using Visual Studio 2003. In fact I do
not have it installed at all. Like I stated, I used Qt Creator. And Qt
Creator uses the MinGW compiler. I could not find out how I could
switch compilers in Qt Creator, thus I made the switch to Visual
Studio 2010 with the Qt Addin.
I have installed VS C++ 2008 Express and VS C++ 2010 Express. But
somehow Qt did not want to setup with those. Thus now I installed
Visual Studio 2010 and followed these instructions to set it up:
http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/
It worked and now I am trying to get the things I already done in Qt
Creator over to Visual Studio.
- I loaded the .pro file with Qt -> Open Qt Project File
- Added the additional includes and libraries of Qt to the project.
- And tried to compile it.
Compiling did not work and resulted in the error below. Which suggests
to me that Qt's MOC does not connect with Visual Studio's compiler.
Maybe I am missing something in my project, like a pre-build command
or an include directory for source and headers.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
1>------ Build started: Project: DataProcessor, Configuration: Debug
Win32 ------
1>Build started 12-2-2011 15:39:50.
1>InitializeBuildStatus:
1> Touching "C:\local\NiekHoeijmakers\Project_Repository\KinectProject
\DataProcessor\..\DataProcesor-interim\Debug
\DataProcessor.unsuccessfulbuild".
1>CustomBuild:
1> Moc'ing include\DataProcessor.h...
1> moc: Too many input files specified
1> Usage: moc [options] <header-file>
1> -o<file> write output to file rather than stdout
1> -I<dir> add dir to the include path for header files
1> -E preprocess only; do not generate meta object
code
1> -D<macro>[=<def>] define macro, with optional definition
1> -U<macro> undefine macro
1> -i do not generate an #include statement
1> -p<path> path prefix for included file
1> -f[<file>] force #include, optional file name
1> -nw do not display warnings
1> @<file> read additional options from file
1> -v display version of moc
1> Moc'ing include\mainwindow.h...
1> UIC resources\Forms\mainwindow.ui
1> Rcc'ing resources\Icons\icons.qrc...
1>ClCompile:
1> moc_DataProcessor.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'Debug
\moc_DataProcessor.cpp': No such file or directory
1> moc_mainwindow.cpp
1> mainwindow.cpp
1>C:\Program Files\OpenNI\Include\XnCppWrapper.h(3279): warning C4100:
'bState' : unreferenced formal parameter
1>C:\Program Files\OpenNI\Include\XnCppWrapper.h(4612): warning C4189:
'nRetVal' : local variable is initialized but not referenced
1>src\mainwindow.cpp(2): fatal error C1083: Cannot open include file:
'ui_mainwindow.h': No such file or directory
1> Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.90
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========
--------------------------------------------------------------------------------------------------------------------------------------------------------
> ...
>
> meer lezen »