Results 1 to 3 of 3

Thread: How do I build project in current directory on Windows?

  1. #1
    Join Date
    Mar 2011
    Posts
    22
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How do I build project in current directory on Windows?

    Oh great...
    Now to add to my list of problems, I'm now seeing that the header file its complaining about is not even showing up in the Projects file tree pane, or whatever you call it. Even though the path to the file is correct, and the file exists, and I've also tried removing it from the project, and then adding it again through right-click to project->select "Add Existing Files" and then selected the trouble file again, but still its not showing up in the tree view. And of course, I'm still getting the "no rule to make target" error again...

    So I don't know what the hell is the problem.

    EDIT: Oh even better. Now the forum seems to have copied my original post and added my new post's text above to the copy of the original post after the text "Added after X amount of minutes", and so I tried to edit my second post, and removed the original post's content from that, and tried to save it so that it would only have the new post's content, but that only fucked up my original post to contain the same content as my second post which I tried to save, and deleted my second post. So now I'm really fucked...
    Last edited by Coolname007; 4th October 2012 at 03:31.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How do I build project in current directory on Windows?

    Don't worry, here is your original post

    Hello.
    I'm wondering how to build project in current directory of .pro file, instead of "debug" or "release" subfolder.
    The reason I need to do this is because when I tried building my project, it complained about "No rule to make target 'blah blah blah' needed by /debug/C_html4_attributes.o'. Stop.".
    So I went and looked in my Makefile.debug file and discovered the reason for the problem: its looking for the included header files in parent directories of the "debug" subfolder, instead of parent directories of the current directory, meaning qmake did not evidently generate the right paths for the makefile, and adjust the header include paths to account for the debug subfolder, but instead just copied them as it is in the .pro file, thus creating the problem I'm having only on Windows (the same project builds just fine on another OS - Ubuntu - on the same computer, obviously because in Linux, it does not build the executable in a subfolder, but builds it in the same directory as the .pro file).

    Anyone have any solution for this problem??

    Thanks in advance..


    Added after 49 minutes:


    Oh great...
    Now to add to my list of problems, I'm now seeing that the header file its complaining about is not even showing up in the Projects file tree pane, or whatever you call it. Even though the path to the file is correct, and the file exists, and I've also tried removing it from the project, and then adding it again through right-click to project->select "Add Existing Files" and then selected the trouble file again, but still its not showing up in the tree view. And of course, I'm still getting the "no rule to make target" error again...

    So I don't know what the hell is the problem.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    Coolname007 (5th October 2012)

  4. #3
    Join Date
    Mar 2011
    Posts
    22
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How do I build project in current directory on Windows?

    Thanks wysota.

    UPDATE on the issue:

    It turns out I was wrong. The problem wasn't that it was looking at the relative path from the perspective of the "debug" folder (I thought that because in the Makefile.debug it showed for the C_html4_attributes.o object file the paths to the header files which the C_html4_attributes.o needed in order to compile, one of which was the target file it was complaining about, i.e. S_html_attr_value.h, and I was thinking that the paths were being used by the .o file, but then I realized that no...the paths are being used by the make program which is looking at the relative paths from the perspective of the current directory of the MAKEFILE.debug file, and so there is no problem there). However, I did track down the issue anyway and fixed it. It turned out I was using too many subfolders in the project, and so two many characters were in the filepath I guess, which Windows doesn't like, so that's why it was reporting that problem: evidently either qmake or maybe mingw's make program wasn't able to access the file due to the extremely long filepath, and thus wasn't able to generate a rule or maybe execute a rule on that file, thus creating the issue.
    So once I removed some umpteen "modules" subfolders from the project, it compiled and ran without any problems.

    So I am happy to say that this problem is resolved.

Similar Threads

  1. How can I watch for changing current directory?
    By UASlaX in forum Qt Programming
    Replies: 4
    Last Post: 6th September 2011, 15:05
  2. Replies: 7
    Last Post: 2nd November 2009, 19:07
  3. Getting Current Directory.
    By afflictedd2 in forum Qt Programming
    Replies: 2
    Last Post: 16th November 2008, 22:27
  4. Qt 4 current directory path
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 7th May 2008, 18:58
  5. Couldn't change current directory in windows's QT
    By sinha.ashish in forum Qt Programming
    Replies: 3
    Last Post: 25th February 2008, 05:00

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.