Find the answer to your Linux question:
Results 1 to 3 of 3
Hi there, I'm developing a project under PROJ_DIR. I'm building a QT based application that links in a few 3rd party libraries. Under PROJ_DIR I have all my source *.cpp ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Location
    Brockville, Ontario, Canada
    Posts
    74

    Tips on directory/project file conventions??


    Hi there,
    I'm developing a project under PROJ_DIR. I'm building a QT based application that links in a few 3rd party libraries. Under PROJ_DIR I have all my source *.cpp and *.h files that I'm building with. I also have "moc", "obj", "ui", and "bin" directories to keep things well organized (I set the appropriate variable in the *.pro file to make this happen).

    My question is, does anyone know how I can place all my *.cpp and *.h files in a "src" directory and have the project file that is in PROJ_DIR to look into this "src" folder for the project source files.

    My other problem is I want to create small "driver" applications under something like "PROJ_DIR/test/" that will be used to test subsets of my project classes. So, somehow I need to create a project file in that directory that can also include files from "../src" when building the executable. Am I making sense? I'm basically trying to get things organized well but I'm having problems getting the *.pro files to do what I need them to do.

    Any advice?

    Thanks

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035

    Re: Tips on directory/project file conventions??

    Quote Originally Posted by sadohert
    Hi there,
    I'm developing a project under PROJ_DIR. I'm building a QT based application that links in a few 3rd party libraries. Under PROJ_DIR I have all my source *.cpp and *.h files that I'm building with. I also have "moc", "obj", "ui", and "bin" directories to keep things well organized (I set the appropriate variable in the *.pro file to make this happen).

    My question is, does anyone know how I can place all my *.cpp and *.h files in a "src" directory and have the project file that is in PROJ_DIR to look into this "src" folder for the project source files.
    You, my friend, would be very well assisted by the magic of GNU Make. There's plenty of online docs, but I particularly enjoyed the book Managing Projects with GNU Make 3rd Edition by O'REILLY.

  3. #3
    Just Joined!
    Join Date
    Apr 2005
    Location
    Brockville, Ontario, Canada
    Posts
    74
    Thanks for the reference! I've added it to my book shopping list.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •