Show: Object Pascal C++
Display Preferences

C++ Object File (*.obj, *.o)

From Appmethod Topics
Jump to: navigation, search

Go Up to File Types Index


A C++ object file is an intermediate file produced by a C++ compiler from a C++ implementation file and the C++ header files that the implementation file includes. The C++ linker produces the output executable or library of your project from your C++ object files.

Appmethod can generate C++ object files from both Object Pascal and C++ projects.

The file extension of C++ object files is:

  • obj when you build your project for 32-bit Windows.
  • o when you build your project for any other supported platform.

Appmethod C++ Object Files

When you build a C++ project, Appmethod generates a C++ object file for each unit in your project and a C++ object file for your project.

When you build your C++ project, Appmethod generates your C++ object files by default into C:\Users\<user>\Documents\Embarcadero\Studio\Projects\<project>\<platform>\<build configuration>.
For packages, Appmethod also creates a static version of your C++ object files, generated by default into C:\Users\<user>\Documents\Embarcadero\Studio\Projects\<project>\<platform>\<build configuration>\staticobjs. See Building Static Packages for more information.

To change the output directory, use the Object file output directory option in Project > Options > C++ Compiler > Directories and Conditionals.

C++ Object Files in Object Pascal Projects

When you build Object Pascal projects, Appmethod generates a C++ object file for each unit in your project and a C++ object file for your project if you select any of the following values for the C/C++ Output file generation option in Project > Options > Object Pascal Compiler > Output - C/C++:

  • "Generate C .objs"
  • "Generate C++ .objs"
  • "Generate C++ .objs, headers"
  • "Generate C++ .objs, headers, namespaces"
  • "Generate C++ .objs, headers, namespaces, export"
  • "Generate C++ .objs, namespaces"
  • "Generate C++ .objs, namespaces, export"
  • "Generate C++ .objs, headers, exports"
  • "Generate C++ .objs, exports"
  • "Generate all Appmethod C++ files (including package libs)"
Note: For Object Pascal packages, only the last choice is offered.

When you build your Object Pascal project, Appmethod generates your C++ object files by default into C:\Users\<user>\Documents\Embarcadero\Studio\Projects\<project>\<platform>\<build configuration>.
To change the output directory, use the C/C++ .obj/.lib output directory option in Project > Options > Object Pascal Compiler > Output - C/C++.

See Also

Personal tools
In other languages