Pascal Delphi - Undeclared Identifier -


i'm using synapse library in delphi project networking.

when try , use 1 of types defined in external units, i.e: 'ttcpblocksocket', has red underline , says "undeclared identifier 'ttcpblocksocket'".

the files in correct folders , 'uses' statement can find them , shows no errors.

the strange thing i've had identical setup in project , there have been no errors in project.

as note: can't install/edit software/settings, can't add fixes.

this well-known bug in error insight. has existed since error insight first introduced in delphi 2005 or 2006, , still exists today in delphi xe5.

it's caused different compiler being used error insight, apparently, doesn't have access same symbol set used code insight compiler (the 1 helps find symbols in code editor) or command-line compiler (the 1 used compile code application or package). therefore uses files referenced in project (.dpr) file locate symbols, , since majority of files in uses clause in code aren't in .dpr, can't find them.

there 2 fixes (one easy, , 1 works pain in backside):

  1. (the easy one). turn off error insight totally, in tools->options, editor options section, code insight; uncheck box error insight. prefer 1 because error insight doesn't work anyway, , avoids annoyance of having use other option every 10 minutes. first thing when install new version of ide , see red underlines.

  2. (the pain way). use project->add project every unit contains 1 of underlined symbols. adds reference every unit project .dpr file, causes increase in size drastically. it's pain because typically have every single unit (in experience, including part of standard vcl/rtl) hasn't been added, , becomes irritating. error insight doesn't tell quick ctrl+f9 won't anyway, imo.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -