Build issue in Qt 5.7



  • Hi,
    I have installed the latest version of Qt 5.7,and i tried to build examples shown in the qt but am getting errors........for eg when i tried to build the hello translator example the error shown is as follows:-

    C:\qt5.7\5.7\msvc2013\include\QtCore\qglobal.h:45: error: C1083: Cannot open include file: 'cstddef': No such file or directory

    I have already included the lib,bin and include path in the environment variable settings

    from running several examples what i understood is that the compiler files in the Microsoft visual studio is not available in the Qt creator.Especially the cpp files if used like iostream,stdio......etc leaves error as "No such file or directory"

    Is there some thing else to be taken care of while installing Qt 5.7,can someone suggest a solution for this issue.........

    Thanku


  • Moderators

    @Nisha Which compiler are you using? Since you installed Qt for MSVC2013 you need MSVC2013 to be installed on your system. In QtCreator you should check the Kit you're using to build: which compiler is set there?



  • @jsulm Thanku for the reply,
    The compiler is by default auto detected and set as follows:-
    Desktop Qt 5.7 MSVC2013 32bit
    and i have MSVC2013 installed in my system too

    by anychance can this error be due to the windows sdk used.....?if not what may be the real cause of this error.


  • Moderators

    @Nisha Strange. I recently set up Qt/QtCreator with MSVC2015 on Windows 10 and it works just fine. Can you try to build a simple C++ application in MSVC2013 without Qt? Just to see that your VS set-up is fine.



  • @jsulm by running a small program on plain cpp project
    #include <iostream>

    using namespace std;

    int main(int argc, char *argv[])
    {
    cout << "Hello World!" << endl;
    }
    i am getting an error like this
    error: C1083: Cannot open include file: 'iostream': No such file or directory

    so if i change the above cpp program to a simple addition program as below

    //#include <iostream>

    using namespace std;

    int main(int argc, char *argv[])
    {
    // cout << "Hello World!" << endl;

    int a=5;
    int b=10;
    int c=a+b;
    return 0;
    

    }

    then the following error appears
    :-1: error: LNK1104: cannot open file 'MSVCRTD.lib'

    By the way Iam using windows 7 operating system,if this info can be of any use to u in helping me out....


  • Moderators

    @Nisha So, you did this in VS2013, right? In this case I would say your VS2013 set-up is broken. Check whether you installed C++ stuff completely (it is not installed by default).



  • @jsulm No,actually my VS2013 is working fine....,i did it in Qt creator 5.7......it is then these errors showed up....


  • Moderators

    @Nisha How did you set up compiler in QtCreator? Can you show the screen-shot?



  • @jsulm Yeah sure
    alt text
    alt text


  • Moderators

    @Nisha Image upload does not work properly in this forum. Please upload the screen-shot to somewhere else and post a link here.



  • Hi @Nisha

    You can use the below link to upload the image and share the screenshot.

    https://postimage.org/

    Thanks,



  • @jsulm hi
    i am having same error,

    C:\Qt\Qt5.6.0\5.6\msvc2015\include\QtCore\qglobal.h:39: error: C1083: Cannot open include file: 'cstddef': No such file or directory

    i am beginner in qt and qml
    qt creator3.6.1 based on Qt 5.6.0 msvc 2013 32 bit
    kits: desktop Qt 5.6.0 msvc2015 32 bit
    compiler detected microsoft visual C++ compiler 14.0 (x86) and 4 more for amd and arm
    in vs 15 sample project of "Hello world" works fine


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.