Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Customization directory path per project ?

Customization directory path per project ?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharpvisual-studiocom
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yarp
    wrote on last edited by
    #1

    I'm trying to compile a Linux game (Freeciv) with visual C++. The project is organized in severall libraries and 2 .EXEs. As it is a gnu cimpilation I would like to modify the sources as few as possible. I've got a problem because each of the libraries has its sources and headers in a separate folder. Each time I try to compile the main project I've got the "fatal error C1083: Cannot open include file: 'astring.h'" error. I know I can add those libraries directories to Visual Studio search path by using the Tools | Options | Directory menu. But this setting is for the whole Visual C++ not only for my project. Is there a way to add those directories to the compiler search path just for a single project ? Yarp http://www.senosoft.com/

    K H 2 Replies Last reply
    0
    • Y yarp

      I'm trying to compile a Linux game (Freeciv) with visual C++. The project is organized in severall libraries and 2 .EXEs. As it is a gnu cimpilation I would like to modify the sources as few as possible. I've got a problem because each of the libraries has its sources and headers in a separate folder. Each time I try to compile the main project I've got the "fatal error C1083: Cannot open include file: 'astring.h'" error. I know I can add those libraries directories to Visual Studio search path by using the Tools | Options | Directory menu. But this setting is for the whole Visual C++ not only for my project. Is there a way to add those directories to the compiler search path just for a single project ? Yarp http://www.senosoft.com/

      K Offline
      K Offline
      keegan
      wrote on last edited by
      #2

      well, one simple fix is to put the full path of the files when you include them, ex:

      #include "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\astring.h"
      

      I dont know where astring.h is, but thats what i had to do for a project a few months ago. just put the full path in the include "" things. *.* cin >> knowledge;

      1 Reply Last reply
      0
      • Y yarp

        I'm trying to compile a Linux game (Freeciv) with visual C++. The project is organized in severall libraries and 2 .EXEs. As it is a gnu cimpilation I would like to modify the sources as few as possible. I've got a problem because each of the libraries has its sources and headers in a separate folder. Each time I try to compile the main project I've got the "fatal error C1083: Cannot open include file: 'astring.h'" error. I know I can add those libraries directories to Visual Studio search path by using the Tools | Options | Directory menu. But this setting is for the whole Visual C++ not only for my project. Is there a way to add those directories to the compiler search path just for a single project ? Yarp http://www.senosoft.com/

        H Offline
        H Offline
        HPSI
        wrote on last edited by
        #3

        Go to Project | Settings | C/C++ | Preprocessor and add the include directory to the "Additional include directories" field. For example, you could add "..\include" (without the quotes). You can do a similar thing for the .lib files: go to the Link tab, and under Input, add the lib path to "Additional library path". Tip: if you do either of the above, make sure the project is selected in the tree on the left, not just one file in the project. Also, make sure "All Configurations" are selected in the combobox (although you might have separate libs for debug and release, in which case you will want to do the Link step twice). HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

        Y 1 Reply Last reply
        0
        • H HPSI

          Go to Project | Settings | C/C++ | Preprocessor and add the include directory to the "Additional include directories" field. For example, you could add "..\include" (without the quotes). You can do a similar thing for the .lib files: go to the Link tab, and under Input, add the lib path to "Additional library path". Tip: if you do either of the above, make sure the project is selected in the tree on the left, not just one file in the project. Also, make sure "All Configurations" are selected in the combobox (although you might have separate libs for debug and release, in which case you will want to do the Link step twice). HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

          Y Offline
          Y Offline
          yarp
          wrote on last edited by
          #4

          Thanks a lot, I've been wondering if it was possible for a long time now - but this afternoon I had no choice since I wanted this gnu project to be as less modified as possible. Thnaks a lot for the reply ;) Yarp http://www.senosoft.com/

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups