Results 1 to 2 of 2

Thread: Header not recognized by QT

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2013
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Header not recognized by QT

    I'm having an issue with QT where a header is not recognized. The screenshot below best illustrates my issue. Even though QT recognizes it, when I click run, it gives me an error saying there is no header file. What could be the reason for this?

    I was making this application for a couple days and the header was always recognized. I ended up doing a qmake and added an additional argument -d which, when the application was run, caused infinite errors. I say infinite because I saw the red circle keep going up from 1 to 50-60 before my QT froze and I ctrl-alt-deleted out of there. When I went back into my project, all of a sudden my StdAfx.h header file is not recognized. This is extremely odd to me. I've spent half the day trying to figure it out, uninstalling QT, uninstalling VS, and reinstalling both. etc etc.

    Along with this header not being found, I also got the error below so I suspect that the main issue may be related. Has anyone ever gone through this issue? Even when I created a new project now and added the file StdAfx.h to the project it was not recognized. I've even tried creating a new header file and just copying the code from StdAfx.h to that new header file in case the original was corrupt. No luck. As shown in the screenshot StdAfx.h is in the shared folder.

    Qt Code:
    1. #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
    To copy to clipboard, switch view to plain text mode 

    StdAfx.h
    Qt Code:
    1. #ifndef DLLEXP
    2. #define DLLEXP __declspec( dllexport )
    3. #endif
    4.  
    5. #ifdef _MSC_VER
    6.  
    7. #define assert ASSERT
    8. #define snprintf _snprintf
    9.  
    10. #include <afxwin.h>
    11.  
    12. #endif
    To copy to clipboard, switch view to plain text mode 


    .pro file has the below snippet
    Qt Code:
    1. INCLUDEPATH += $$PWD/SocketClient
    2. DEPENDPATH += $$PWD/SocketClient
    To copy to clipboard, switch view to plain text mode 




    [ATTACH=CONFIG]Header not Recognized[/ATTACH]
    Attached Images Attached Images

Similar Threads

  1. Generated UI header incorrectly includes class header?
    By droneone in forum Qt Programming
    Replies: 7
    Last Post: 14th June 2012, 14:48
  2. Right ALT key not recognized
    By papillon in forum Newbie
    Replies: 1
    Last Post: 21st October 2011, 09:06
  3. Replies: 8
    Last Post: 8th August 2011, 20:47
  4. QStandardItem's header item and header label
    By feverzsj in forum Newbie
    Replies: 1
    Last Post: 14th January 2010, 19:57
  5. How to customize horizontal header (diagonal header view)
    By vairamuthu.g in forum Qt Programming
    Replies: 4
    Last Post: 4th September 2008, 15:59

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.