This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCSv5.3: C/C++ search not working.

Guru 20045 points


Hello,

C/C++ Search is not able to find anything.  I set the File Name patter to * and I also limited the scope to my working sets - previously I had it set to workspace.

Also, the project I am searching in is the active project.

I have been using File Search without any problems.  Now I want to search for whole words only.

Stephen 

  • Hi Stephen,

    are you launching the CTRL+H search?   Are we talking about linked files?

    Best Regards,
    Lisa

  • Hello Lisa,

    I am searching in the entire workspace, which contains several projects (main project and unit test projects). 

    The Unit test project have linked files, but the main project doesn't.  Also, what I am searching for is not in a linked file.

    I click on the down arrow button, which brings up the same dialog box.  I tried with CTRL+H and had the same results.

    The workspace directory doesn't actually contain the actual project directories.  I am not sure if that would be causing the problem.  However, I tries both search in the Workspace and working sets with the same results.  I have two working sets: one for the source code project and one for the unit tests projects.

    The main project and possibly some of the other unit tests projects were originally created in CCSv4.

    Stephen

  • Hi stephen,

    I certainly believe linked files will be a problem.  However the others should not.  what tab and settings have you been using? Do you have permissions on those folders?

    Best Regards,

    Lisa

  • Hello Lisa,

    The folders are where I store the source code that I am currently developing, so I have read/write permission. 

    The working space is located in a different folder than the source code.  Is that an issue?

    What do you mean by tab and settings?

    Stephen

  • Hi Stephen,

    the files being in another directory should be ok, linked files I expect to be a problem.  What I meant is a CTRL+H search brings up a box with multiple tabs/search types.  I was wondering if you have been using the file search?

    Best Regards,
    Lisa

  • Hello Lisa,

    I am using CTRL+H that brings up several tabs and one of the tabs is C/C++ search.

    Also, I am searching the actual files that contain the source, so I should be able to find what I am searching for.

    I have been using File Search, but that doesn't allow me to search for whole word only.  That's why I want to use C/C++ search.

    Also, I noticed that C/C++ search removes the "." in a structure variable, i.e. var1.a .  Including the issue I am having now, is there any way to keep it from doing that?

    Thanks,
    Stephen

  • Ok, I got it working on one computer but not another.

    Not sure what's going on.  I have been moving projects from a desktop to a laptop and the C++ search works on the desktop, but not the laptop..

    I'll have to look into it a little more.

    Stephen

  • It seems to be finding global variables and functions but not local variables.

    Why is that?

    Stephen

  • Hi Stephen,

    ok, please keep us informed.  That is odd and seems to indicate something with the environment on the laptop.   It might be of interest to see what might be different in the two cases.

    As mentioned, it should work (as you found on your one pc) and that is what I have found on my installation.

    At any rate, do keep us informed and hopefully you will be able to get the laptop search working as you'd like.

    Best Regards,
    Lisa

  • Hi Stephen,

    can you please expand a bit on the local/global varialbe issue/question?  What exactly do you mean not finding local variables?   The only thing I am aware of is variables being optimized out, but I don't know that this would be relevant if we are discussing the search engine.

    Best Regards,

    Lisa

  • When I try to find a local function variable, i.e.

    int globalVariable = 1;

    void function1(void)

    {

         int localFunctionVariable;

         localFunctionVariable= 1

    }

    it's not able to find localFunctionVariable, but it is able to find globalVariable.

    Stephen