about INCLUDEPATH



  • in my pro
    INCLUDEPATH +=C:/Users/Lee/Documents/untitled5
    and some head file are in there;
    but however when i want to define a variable in that head file ,i failed
    error: 'Untitled5' was not declared in this scope
    but if i add the real path to the cpp file where the define appare it works
    #include "../untitled5/untitled5.h"
    why?
    ^



  • hi.

    INCLUDEPATH +=C:/Users/Lee/Documents/untitled5

    this just add to include area. just folder(directory).
    in path, untitled5 is directory name. right?

    so ,
    INCLUDEPATH +=C:/Users/Lee/Documents/untitled5
    and
    #include "untitled5.h"

    then they work you want.

    if it has confusion, you should change the directory name or the file name..


Log in to reply
 

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