Results 1 to 3 of 3

Thread: defining a secondary "searching folder" for external codes

  1. #1
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default defining a secondary "searching folder" for external codes

    Hi,

    I have no idea actually for the proper keywords, so maybe it is enough to tell them if it is that easy.
    I would like to use some codes in my application that were downloaded from alglib.net (these are headers and cpp-s). As I would like to use them in more projects it could be very efficient just to include them in the "old way" like
    #include <wantedAlglibLibrary>
    or at least to define somehow this secondary folder in which the compiler should searh for the included files. This is like when I add my own codes with the
    #include "mycode.h"
    but in this case the code will be searched in the project's folder. The problem is that in the alglib files similar include lines were written, so whilst compiling each will be searched in the project's folder. See my point?

    Just to make it clear:
    I have
    d:/mypath/alglib/alglibsource.h --> there is #include "otheralglibsource.h"
    d:/my_other_path/main.cpp --> there can be #include "d:/mypath/alglib/alglibsource.h"

    but this will fail because in alglibsource.h there is simply "otheralglibsource.h" written instead of "d:/mypath/alglib/otheralglibsource.h"

    so it would be nice to use it just like this:
    d:/my_other_path/main.cpp --> #include "aglibsource.h"
    or
    d:/my_other_path/main.cpp --> #include <aglibsource.h>
    Szilvi

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: defining a secondary "searching folder" for external codes

    so it would be nice to use it just like this:
    d:/my_other_path/main.cpp --> #include "aglibsource.h"
    or
    d:/my_other_path/main.cpp --> #include <aglibsource.h>
    you can.
    Just set in each project the include search path.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

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

    szisziszilvi (12th May 2011)

  4. #3
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: defining a secondary "searching folder" for external codes

    lovely! Thank you very much. with a very little bit of search:
    this one gave me the hint for the correct answer about INCLUDEPATH
    Szilvi

Similar Threads

  1. Replies: 5
    Last Post: 9th May 2011, 13:40
  2. Replies: 1
    Last Post: 12th October 2010, 14:43
  3. phonon on a "secondary" display (X11)
    By mnavarro in forum Qt Programming
    Replies: 10
    Last Post: 21st November 2008, 16:38
  4. Replies: 8
    Last Post: 5th August 2008, 12:09
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

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.