Embeds information into the object code for the linker.
#pragma comment(type [ “value”])
type
Set type to: lib, exestr, linker, user, or compiler.
value
Name of file without extension to embed into the object code.
Embeds information into the object code. The linker searches for the library file using the access paths in the IDE or the MWLibraries environment variable in the command line tool and include it after any explicitly-specified files on the command line. See Table 11.1 for a list of comment usage examples.
Example | Description |
---|---|
comment(lib, “library”) | Instructs the linker to automatically link against library[.lib] file when the Link with default libraries setting is enabled. |
comment(linker, “directive”) | Embed a linker directive using the Linker Command File (.cmd) syntax. |
comment(user, “string”) | Embed a comment into the object file. |
comment(exestr, “string”) | Embed a string into the executable. |
comment(compiler) | Embed compiler version into object file. Normally ignored for compatability. |
This pragma does not correspond to any panel setting. To check this setting, use the __option (comment).