The link order of object module files and library files is decided automatically, but you can also set the order.
The procedures for performing this operation are described below.
On the project tree, select the Build tool node, and then select [Set Link Order...] from the context menu. The Link Order dialog box will open.
The names of the following files are listed in [File] in the order that the files are input to the linker.
Object module files which are generated from the source files added to the selected main project or subproject |
Object module files which are added directly to the project tree of the selected main project or subproject |
Library files which are added directly to the project tree of the selected main project or subproject |
The default order is the order that the files are added to the project. |
By changing the display order of the files, you can set the input order of the files to the linker.
Change the file display order by one of the following procedures.
You can use a link order specification file to change the display order on a file basis. |
Click the [Export] button in the Link Order dialog box to open the Select Export File dialog box.
In the dialog box, specify the file (link order specification file) that is output the list of the file names displayed in [File] in the Link Order dialog box.
Click the [Save] button to generate the link order specification file.
Only the file names are output to the link order specification file. |
Open the link order specification file with an editor, and then change the description order of the file names.
The code example of the link order specification file is shown below.
# CS+ Vx.xx.xx Link order specification file # SampleProject: Xxxxxx xx, xxxx file01.obj file03.obj library02.lib file02.obj library01.lib library03.lib : |
The following points should be noted when describing the link order specification file.
Click the [Import] button in the Link Order dialog box to open the Select Import File dialog box.
In the dialog box, select the link order specification file and click the [Open] button.
The description order of the file names are acquired from the selected link order specification file, and then they are reflected in [File] in the Link Order dialog box.
The file that is described in the link order specification file and is not added to the project is not displayed. |
The file that is added to the project and is not described in the link order specification file is displayed in the end of [File]. |
If a file with the same name exists, check the location of the file in the popup display (it will appear when you hover the mouse cursor over the file name). |
Click the [OK] button in the Link Order dialog box to set the input order of the files to the linker.