0

I have been tasked with converting a project that was built in QtCreator to .NET

The first thing I am trying to do is build the project in QtCreator so that I can step thru its execution to follow the flow and see some of the variables at play (real values).

When I build, I get a lot of errors like this:

error: C1083: Cannot open include file: 'QFrame': No such file or directory error: C1083: Cannot open include file: 'QMainWindow': No such file or directory error: C1083: Cannot open include file: 'QSpinBox': No such file or directory 

When I search my drive, I do find 'QFrame', but in paths that have things like this in them:

android_armv7 msvc2013_64 winphone_x86 winrt_x64 

Here is my .pro file

TEMPLATE = app CONFIG *= warn_on CONFIG(debug, debug|release): CONFIG *= console QT += widgets #------------------------------------------------------------ # Source Files #------------------------------------------------------------ FORMS += \ GUIDemo.ui \ Registration.ui \ HEADERS += \ CustomFrames.h \ GUIDemo.h \ MultiRadar.h \ QControlUtils.h \ ScannerInfo.h \ TabAdvanced.h \ TabBScan.h \ TabGuardZone.h \ TabImage.h \ TabInstallation.h \ TabPPI.h \ TabTargets.h \ SOURCES += \ CustomFrames.cpp \ GUIDemo.cpp \ MultiRadar.cpp \ QControlUtils.cpp \ ScannerInfo.cpp \ TabAdvanced.cpp \ TabBScan.cpp \ TabGuardZone.cpp \ TabImage.cpp \ TabInstallation.cpp \ TabPPI.cpp \ TabTargets.cpp \ main.cpp \ #------------------------------------------------------------ # Include directories #------------------------------------------------------------ INCLUDES = \ ../../include \ #------------------------------------------------------------ # UI Generation #------------------------------------------------------------ CONFIG(debug, debug|release): TARGET_DIR = debug CONFIG(release, debug|release): TARGET_DIR = release UI_DIR = GeneratedFiles MOC_DIR = $${UI_DIR}/$${TARGET_DIR} INCLUDEPATH += $${UI_DIR} #------------------------------------------------------------ # Libraries #------------------------------------------------------------ LIBS += \ -L../../lib/$${TARGET_DIR} \ -lNRPClient \ -lNRPPPI \ #------------------------------------------------------------ # Final config #------------------------------------------------------------ #set the qmake variables DEPENDPATH += $$INCLUDES INCLUDEPATH += $$INCLUDES 

The folder indicated by INCLUDES is there and contains a bunch of project-specific header files.

I have a feeling that I am missing some part of QtCreator that would allow me to build for Win7.

4
  • Could you post the contents of your project's .pro file? Commented Oct 20, 2014 at 4:59
  • Also check if that old project was on some older version of Qt and uses QtSingleApplication or some other classes which aren't part of the Qt5 versions. Commented Oct 20, 2014 at 5:05
  • .pro file added to OP Commented Oct 20, 2014 at 12:47
  • I am assuming that the project you have was developed and built on an older version of Qt, probably Qt 4.x. Check one of the project's header files and see of the includes are something like #include <QtGui/QFrame> instead of #include <QFrame>. Commented Oct 20, 2014 at 13:29

1 Answer 1

1

Qt Creator is just the IDE. You need to have installed the Qt libraries as well, so make sure you have them.

These errors suggest that the project's .pro file should add the widgets module:

QT += widgets 

This makes sure the project includes the right include directories (the ones that have QFrame and such) and library directories on Qt 5.x.

EDIT:

After a little bit of chat, we discovered that Qt SDK for MS2010 was installed, but since the OP had MS2013 on his box, what solved the problem was downloading and installing Qt SDK for MS2013.

Sign up to request clarification or add additional context in comments.

9 Comments

Ok, I addeded 'QT += widgets' to the .pro file right after the 'CONFIG' lines. No joy. How do I make sure I have the Qt libraries installed (properly). I installed with something called qt-opensource-windows-x86-1.6.0-4-online.exe
Tools > Options > Build & Run > Qt Versions
After changing the .pro file, don't forget to Run qmake again.
It says I have Qt 5.3 MSVC2013 64bit and MSVC2010 OpenGL 32bit. Good? How do I run Qmake? I read a thread that indicated a Rebuild All would do it, but after a Clean All and a Rebuild All, I still have the same errors.
@davecove: right click on the project and then run qmake, but yeah, rebuild all should have just worked.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.