Compiling and Building Cross-Platform Applications
Go Up to Cross-Platform Applications Index
In general, you build and compile your cross-platform application in the IDE the same way you build and compile a native Win32 application in RAD Studio.
Contents |
Prerequisites for Cross-Platform Applications
- Before building or compiling a cross-platform application that targets a platform other than 32-bit Windows, you must configure your cross-platform application (that is, add the cross-platform target, activate the target platform, and create a connection profile and, if necessary, an SDK). The development PC must also be connected to the target machine, on which the Platform Assistant is running.
- For local Win32 or Win64 application development, you do not need to do this configuration. However, doing this configuration for remote Win32 and Win64 target platforms enables you to use the Platform Assistant (which facilitates debugging) and the Deployment Manager (which facilitates application deployment).
- For instructions and details, see:
Output Files for Cross-Platform Targets
Output files for Win64 applications have the same names as output files for Win32 applications. However, the Win64 files are output to a different directory than the Win32 files.
Output files for Mac OS X and iOS Device applications typically have the same file names as Win32 files, but have platform-specific file extensions. For example, a static library (.lib on Win32 and Win64) has the .a file extension for OS X and iOS. See also File Extensions of Files Generated by RAD Studio.
Delphi and C++Builder produce libraries that are targeted for the specific target platform:
- On 32-bit and 64-bit Windows, packages and libraries have the file extension
.bpland.dllfiles, respectively. - On Mac OS X, packages and (dynamic) libraries have the file extension
.dylib. The output directory on the Mac is controlled by the environment variabledylib_path. - On the iOS Device platform, packages and (static) libraries have the file extension
.a.
The naming convention used by the IDE is summarized in the following table:
| Output File | On 32-bit Windows (Native) Platform | On 64-bit Platform | On Mac OS X Platform | On iOS Device Platform |
|---|---|---|---|---|
|
Package |
You can set the Package output directory option in the Delphi Compiler page of Project Options.
|
|
|
|
|
Dynamic Libraries |
|
|
|
|
|
Static Libraries |
|
|
|
|
Samples for the current release are located at: C:\Users\Public\Documents\RAD Studio\<n.n>\Samples.
To find the Samples, you can also use Start | Embarcadero RAD Studio | Samples.
32-bit Design-Time Packages Are Required for 64-bit Windows Applications
The IDE is a native 32-bit Windows application. Therefore, in order to use the IDE to design a 64-bit Windows application, you must have 32-bit Windows versions of all the design-time components, packages, and libraries. You need 32-bit versions of these in order to use the components, packages, or libraries in the IDE at design time. If your application uses a specific component, package, or library at run time only, you do not need to have the 32-bit version in your project.
The IDE typically saves packages and libraries in platform-specfic folders. The Mac OS X and iOS files have different file extensions than the Windows versions. But 32-bit Windows and 64-bit Windows versions of packages, libraries, and components created by the RAD Studio IDE have the same file names and extensions; only the paths are different. When you save a component, a package, or a library, the output file is placed in a platform-specific directory, such as Win64 or OS X.
How the Project Manager Treats Cross-Platform Files
The Project Manager enables the correct platform-specific file types for your project, as determined by the currently active target platform. At the same time, the Project Manager disables the file types associated with any inactive target platforms in the current project.
For example, when the target platform is Win32 (the default), commands in the Project Manager (such as Build, Compile, Clean) produce Win32 files, such as .LIB and .OBJ.
As a further example, suppose that your multiplatform C++ project contains the following types of files:
- Static libraries:
-
.a(static library for the Mac OS X and iOS Device target platforms) -
.lib(static library for the 32-bit and 64-bit Windows target platforms)
-
- Object files:
-
.o(object file for the Mac OS X and iOS Device target platforms) -
.obj(object file for the 32-bit and 64-bit Windows target platforms)
-
The Project Manager enables and disables the files as follows:
| State | 32-bit Windows | 64-bit Windows | Mac OS X | iOS Device |
|---|---|---|---|---|
|
Enabled |
|
| ||
|
Disabled |
|
| ||