none
Give ide editor hint about defined "defines" RRS feed

  • Question

  • Hello,

    please apologise if this is the wrong forum to ask this question, but I could not figure out a better one to ask for a solution to my problem.
    What I have is a project-map with two projects. The source files are shared between those projects and the source differs here and there in defines selecting the needed code:

    #ifdef PROJECT1  
    // Code for project 1  
    #elif PROJECT2  
    // Code for project 2  
    #endif 

    The defines are defined per project as pre-processor defines in project properties.

    If I now edit my files one of the code parts is normal, the other one is grayed out and intellisense and other nice stuff does not work. But I would prefer to have the right defines depending on the project currently selecter in project-map-explorer window (or at least by hand defining needed defines). Is that possible, and if, how?
    Please, can anybody help me or point me to the right forum?

    Regards

    • Edited by krecik Friday, July 4, 2008 2:51 PM Misspelling
    Friday, July 4, 2008 12:07 PM

Answers

  • Hello


    Re: Give ide editor hint about defined "defines"


    I am going to mark this thread as answered since you didn't provide any opinion about the answer - I assume you solved the problem yourself or one of the suggestions in this thread helped you solved the problem. If you have a solution you could post it so others can find it. If you don’t have a solution, then please submit further details and then mark the thread as unanswered.


    Thanks!




    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by krecik Thursday, July 10, 2008 3:04 PM
    Wednesday, July 9, 2008 9:07 AM

All replies

  • IntelliSense is too broken for this to work reliably.  Instead of working with the solution file that has both projects, you could open just the .vcproj and have a shot at getting it grayed-out correctly.
    Hans Passant.
    • Marked as answer by krecik Saturday, July 5, 2008 7:59 AM
    • Unmarked as answer by krecik Saturday, July 5, 2008 7:59 AM
    • Marked as answer by Yan-Fei Wei Wednesday, July 9, 2008 9:04 AM
    • Unmarked as answer by krecik Thursday, July 10, 2008 3:04 PM
    Friday, July 4, 2008 7:24 PM
    Moderator
  • Hello


    Re: Give ide editor hint about defined "defines"


    I am going to mark this thread as answered since you didn't provide any opinion about the answer - I assume you solved the problem yourself or one of the suggestions in this thread helped you solved the problem. If you have a solution you could post it so others can find it. If you don’t have a solution, then please submit further details and then mark the thread as unanswered.


    Thanks!




    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by krecik Thursday, July 10, 2008 3:04 PM
    Wednesday, July 9, 2008 9:07 AM