今天编译RM报表 7.0 for XE7 ,build设计时包,提示
{$IFDEF JPEG}, JPEG{$ENDIF}
没有找到 JPEG.DCU,这个应该是XE7自带。
后来 在项目选项里,编译器,加个 VCL.IMAGING。
给Delhi.命名空间 指定单元范围名称 前缀,使你可以在代码中和uses子句或者 包含子句里,使用 部分匹配的名称。
Specifies the unit scope names (prefixes) for Delphi dotted namespaces, to allow you to use partially qualified names in your code and in your uses
clause or #include
.
有2种方式
There are two ways to add a unit scope name for a Delphi unit:
uses
clause. For example: 指定完整的全部
uses FMX.Graphics;
(Delphi)#include FMX.Graphics
(C++)FMX
) to the Unit scope names field. Then the unit scope name FMX
is automatically applied to unit names that belong to that unit scope, and you can simply specify:
uses Graphics;
(Delphi)#include Graphics
(C++)The pop-up button opens an <ordered-list> dialog box for selecting and adding unit scope names, as described in Common Items on Project Options Pages and Ordered list dialog box.
Go Up to Getting Started with RAD Studio
Unit scope names are prefixes that are prepended to unit names in the RAD Studio libraries (VCL-FMX-RTL). That is, names of units, functions, classes, and members have a unit scope name prepended to the unit name, as follows:
The unit scope name precedes the unit name:
<unitscope>.<unitname>. ...
For example, the SysUtils unit is now part of the System unit scope, as follows:
System.SysUtils
and the Controls unit is part of the Vcl or the FMX unit scope: Vcl.Controls
FMX.Controls
Contents |
Unit scope names:
Third party products, such as Indy and TeeChart, are not unit-scoped. When developing new code with third party components, adding unit scope names is not necessary because added uses
entries are automatically scoped.
Component developers can add unit scope names as described in Adding Unit Scope Names for Your Own Components.
With one notable exception, legacy code should continue to work without changes. The one exception is scoped or qualified identifiers in the code itself. Fully qualified identifier names now require unit scoping. This means that if you used qualified identifiers in your existing code (which was not unit-scoped), changes are required in order to compile. You need to add the unit scope name to the unit name.
For example, here is the fully qualified identifier of the TStream classthat you might have specified in previous product releases:
Classes.TStream
The name Classes.TStream is not considered to be a fully qualified class name because fully qualified names must be unit-scoped, that is, they must include the unit scope name. In this case, the unit scope name System must be added to the Classes unit name in order to yield a unit-scoped or fully qualified name, as follows:
System.Classes.TStream
::
). The fully qualified name for the TStream class in C++ code is:
System::Classes::TStream
Possible code changes: If your existing code contains qualified identifiers (such as Classes.TStream.Seek
), you must correct the name so that the identifier is unit-scoped and fully qualified (such as System.Classes.TStream.Seek
).
For new development, you must specify the unit scope for units in your application. Choose any of the following ways to do this:
uses
clause or
#include
. Then in your code, you can partially qualify the names of members of those units that you fully qualified (with unit scope) in the
uses
clause or
#include
.
Caution: Using partially qualified names can significantly slow your compile time because the compilers must resolve all partially qualified names during a compile.
The wizards and templates in RAD Studio use and include properly unit-scoped unit names. In the help, some instances of unit, class, and member names do not include the unit scope names. However, the Libraries documentation has full unit scope names in the page titles.
If your code contains:
uses
System.SysUtils, System.Types, System.Classes, FMX.Controls;
or:
#include <System.SysUtils.hpp>
#include <System.Types.hpp> #include <System.Classes.hpp> #include <FMX.Controls.hpp>
You can specify unqualified member names in your code, such as:
GetPackageInfo // referring to System.SysUtils.GetPackageInfo TRect // referring to System.Types.TRect TNotifyEvent // referring to System.Classes.TNotifyEvent TTrackBar // referring to FMX.Controls.TTrackBar
There are more than a few unit scopes, but most of the unit scopes can be grouped into a few general categories. The following table lists the general categories and the unit scope names in each category:
General Category | Unit Scope Names in this Category |
---|---|
Database-related |
Bde,Data, Data.Bind, Data.Cloud, Datasnap, Datasnap.Win,IB (also System.Bindings) |
FireMonkey |
FMX, FMX.ASE, FMX.Bind, FMX.Canvas, FMX.DAE, FMX.Filter, FMX.Platform, FMX.Printer |
iOS |
iOSapi (RTL) |
Mac OS X |
Macapi, Posix, System.Mac (RTL) |
System-related (Run-Time Library) |
System, System.Bindings, System.Generics, System.Math, System.Sensors, System.Tether, System.Win |
Vcl (Visual Component Library) |
Vcl, Vcl.Imaging, Vcl.Samples, Vcl.Shell, Vcl.Touch |
SOAP, COM |
|
Web-related |
|
Windows API |
Winapi (RTL) |
XML processing |
Xml, Xml.Internal, Xml.Win |
The following table gives the following information:
Unit Scope Name | Units |
---|---|
Androidapi (RTL) |
AppGlue, AssetManager, AssetManagaerIni, Bitmap, Configuration, Consts, Egl, Eglext, EglPlatform Gles, Gles2, Gles2ext, Glesext, Input, IOUtils, JNI.Analytics, JNI.ApkExpansion, JNI.App, JNI.Dalvik, JNI.Embarcadero, JNI.GraphicsContentViewText, JNI.Hardware, JNI.InputMethodService, JNI.JavaTypes, JNI.Licensing, JNI.Location, JNI.Media, JNI.Net, JNI.OpenGL, JNI.Os, Jni, JNI.PlayServices, JNI.Provider, JNI.Support, JNI.Telephony, JNI.Util, JNI.VideoView, JNI.WebKit, JNI.Widget, JNIBridge, JNIMarshal, Keycodes, KhrPlatform, Log, Looper, NativeActivity, NativeWindow, NativeWindowJni, Obb, OpenSles, Rect, Sensor, StorageManager |
See Data |
|
See Data.Bind |
|
See Data.Cloud |
|
See Datasnap |
|
See FMX |
|
See IBX |
|
iOSapi (RTL) |
AssetsLibrary, AVFoundation, CocoaTypes, CoreAudio, CoreData, CoreGraphics, CoreImage, CoreLocation, CoreMedia, CoreMotion, CoreTelephony, CoreText, CoreVideo, Foundation, GLKit, MediaPlayer, OpenGLES, QuartzCore, UIKit |
Macapi (RTL) (Mac Objective-C Frameworks) |
AppKit, CocoaTypes, CoreFoundation, CoreServices, Foundation, Mach, ObjCRuntime, ObjectiveC, OCMarshal, OpenGL, QuartzCore, Security, SystemConfiguration, VarObjC |
Posix |
ArpaInet, Base, Dirent, Dlfcn, Errno, Fcntl, Fnmatch, Grp, Iconv, Langinfo, Limits, Locale, NetDB, NetIf, NetinetIcmp6, NetinetIn, NetinetIp6, Posix, Pthread, Pwd, Sched, Semaphore, Signal, StdDef, Stdio, Stdlib, String_, StrOpts, SysMman, SysSelect, SysSocket, SysStat, SysStatvfs, SysSysctl, SysTime, SysTimes, Systypes, SysUio, SysWait, Termios, Time, Unistd, Utime, Wchar, Wctype, Wordexp |
See Soap |
|
See SysInit |
|
See System |
|
See System.Win |
|
See Vcl |
|
See Web |
|
See Winapi |
|
See Xml |
For a reference list of unit names with their associated unit scope name, see Unit Names Alphabetical List with Unit Scopes.