Results 1 to 5 of 5

Thread: fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

    Hi! After a lot of trouble of making Qt work together with Boost, I had realized that I can't compile a boost application with MinGW, and that I can't compile a Qt application from Visual Studio. At least directly from visual studio. Or can I? A way that I found and which worked was to open "Visual Studio 2008 Command Prompt", cd to the folder containing the source files, type "qmake -project", then just "qmake", and finally "nmake". Or is there any simpler way? I would rather just be able to write a batch file and invoke that by double clicking on it, but I don't know how to make it run in the visual studio command prompt instead of the normal one.

    Anyway, in that way I could compile a Qt hello world program (which I could only find by googling on it, not on Qt's web page!):

    Qt Code:
    1. #include <QApplication>
    2. #include <QPushButton>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication app(argc, argv);
    7.  
    8. QPushButton hello("Hello world!");
    9. hello.resize(100, 30);
    10.  
    11. hello.show();
    12. return app.exec();
    13. }
    To copy to clipboard, switch view to plain text mode 

    However, after just adding the row "#include <stdint.h>", I got this error message:

    Qt Code:
    1. .\hello_world.cpp(3) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
    To copy to clipboard, switch view to plain text mode 

    Why can't the compiler find stdint.h? Don't nmake know that it's supposed to look in "C:\Program Files\Microsoft Visual Studio 9.0\VC\include" (where stdint.h is located) after include files?

    Edit: I am using this program for a project in school and it's very time critical, in fact it is already quite delayed! Please, does anyone know what this problem is caused by? Am I doing this in the right way or should I do it in some other way? I am using Qt 4.6. Thank you really much in advance!

    -Kristofer
    Last edited by TriKri; 8th May 2010 at 20:51.

Similar Threads

  1. Replies: 2
    Last Post: 9th March 2010, 06:21
  2. Replies: 7
    Last Post: 18th September 2009, 15:44
  3. Replies: 10
    Last Post: 15th June 2009, 20:44
  4. Replies: 1
    Last Post: 27th March 2009, 07:22
  5. Replies: 4
    Last Post: 24th November 2007, 14:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.