Author Topic: why can't slickedit find the symbol?  (Read 3259 times)

monkeyzzzz

  • New Community Member
  • Posts: 1
  • Hero Points: 0
why can't slickedit find the symbol?
« on: December 11, 2012, 05:05:05 am »
Hello, everyone, I 'm new here.

I came across an issue about slickedit's function of symbol-finding.

my slickedit version is SlickEdit 2012 (v17.0.1.0 32-bit).
my os version is Windows 7 x64, 6.01.7601  Service Pack 1.

I have source code which is stored under the folder named "src".
There exists a file named "platform.r.h".

I add the extension "r.h" to the slickedit and refer to "c/c++" strategy, then slickedit can parse this file as a c/c++ file.

but when I tried to find the symbol "LATFORM_RESOURCE_MAXFILELENGTH" in the platform.r.h using the "find symbol", the slickedit found no related symbols,but the symbol is actually there. and other symbols like "DEFFILE_INFO_SIGNATURE" in this file can be found by slickedit.

the content of the file is as follows:
( note:BEGIN_NAMESPACE is a marco which has been defined in other h file. It's like "#define BEGIN_NAMESPACE namespace BNAMESPACE_NAME {".. The definition of this macro in this file can be found via the "ctrl+." )


When I delete this macro, the rest symbols can be find.

BEGIN_NAMESPACE

enum ResourceLimits
    {
    LATFORM_RESOURCE_MAXFILELENGTH                    = 256,
    LATFORM_RESOURCE_MAXDIRLENGTH                     = 256,
    LATFORM_RESOURCE_MAXNAMELENGTH                    = 256,
    LATFORM_RESOURCE_MAXEXTENSIONLENGTH               = 256,
    LATFORM_RESOURCE_MAXQUOTEDFILELENGTH              = (DGNPLATFORM_RESOURCE_MAXFILELENGTH+2),

    };

enum
    {
    DEFFILE_INFO_SIGNATURE  = 0xff,    /* Resource Signature byte. */
    DEFFILE_FORMAT_VERSION  = 7,       /* Current version of DefaultFileInfo */
    DEFFILE_MAX_SAVED       = 10,      /* Number of most recently used files to save */
    DEFFILE_BASEID          = -100,
    DEFDGNFILE_ID           = (DEFFILE_BASEID-1),
    DEFIMAGEFILE_ID         = (DEFFILE_BASEID-2),
    DEFRECORDFILE_ID        = (DEFFILE_BASEID-3),
    DEFDISPFILE_ID          = (DEFFILE_BASEID-4),
    DEFNODEFILE_ID          = (DEFFILE_BASEID-5),
    DEFREFFILE_ID           = (DEFFILE_BASEID-6),
    DEFCELLFILE_ID          = (DEFFILE_BASEID-7),
    DEFPLTCFGFILE_ID        = (DEFFILE_BASEID-8),
    DEFUCMFILE_ID           = (DEFFILE_BASEID-9),
    DEFFUNCKEYFILE_ID       = (DEFFILE_BASEID-11),

    };

struct SPoint2d
    {
    Int16       x;
    Int16       y;
    };

//__PUBLISH_SECTION_START__

END_NAMESPACE

How can I solve this problem?
Could you please help me?
Thank you in advance!!!


Phil Barila

  • Senior Community Member
  • Posts: 742
  • Hero Points: 61
Re: why can't slickedit find the symbol?
« Reply #1 on: December 11, 2012, 05:17:45 am »
I can't say absolutely, positively that this is the cause, but it's likely that the BEGIN/END_NAMESPACE macros are causing your trouble.  Define them in the C/C++ Preprocessing options, and you might find that it works.
BTW, SE is up to 17.0.3.0, now.

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: why can't slickedit find the symbol?
« Reply #2 on: December 11, 2012, 05:00:43 pm »
Thanks, Phil, for setting folks on the right path.

@monkeyzzzz : Attached is a screenshot of the options dialog page Phil is referring to. Use the Tools > Options menu item to bring up the dialog and then you can type "preproc" in the Options search field to trim down the tree (as shown). Once you've selected the C/C++ Preprocessor page from the tree, click on the "new" button at the bottom of the macro list. You can leave the definition of the macro empty, and the C++ parser will just skip right over it when indexing your source.
You'll probably want to manually rebuild your project's tag file once you've entered the preprocessor macros. Just use the Project > Retag Workspace menu item.