Visual studio 2005 pro question

This is a discussion on Visual studio 2005 pro question within the C++ Programming forums, part of the General Programming Boards category; Hello there, This is my situation: I have a solution with several projects. Most of these projects depend on a ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    69

    Visual studio 2005 pro question

    Hello there,

    This is my situation: I have a solution with several projects. Most of these projects depend on a certain library that is installed in a direction on a higher level than the solution dir. For example: solutiondir: C:\mysolution , librarydir: C:\mylib. So I can only reference the library with an absolute path, not a relative one. I may want to change this folder regularly, but I don't like going through all my projects and changing the include directories. Is there a good solution to this?

    If I could have way to declare a macro (like $solutiondir), I could use that throughout the projects so I only have to change it in 1 place.

    Thanks in advance

    PS if this is the wrong forum, please move this thread.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,000
    Visual Studio likes to keep relative paths to projects, so that should be fine.
    Then you can add an extra include path under general I think. Then you can #include <myfile.h>, without having to worry about the path.

    Visual Studio also have macros such as solution directory as you say, and some others. You can check them out and see if they help you in any way. They only work in project settings, however. But you can use them to set up an additional include path.

    Hope this information helps.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  2. Problem Compiling Program
    By wco5002 in forum C++ Programming
    Replies: 13
    Last Post: 11-06-2007, 12:56 PM
  3. Templates and Macros plus more...
    By Monkeymagic in forum C++ Programming
    Replies: 8
    Last Post: 01-20-2007, 05:53 PM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  5. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21