Setting Additional Compile and Link Options
Additional compile and link options (which are compiler specific) can be added to projects via the
IRuntimeObjectSystem interface functions:
virtual void SetAdditionalCompileOptions( const char *options, unsigned short projectId_ = 0 ) = 0; virtual void SetAdditionalLinkOptions( const char *options, unsigned short projectId_ = 0 ) = 0;
Compile options are appended to the compile string after the standard RCC++ compile options. Link options are compiler dependent:
- For Visual Studio added at the end of the compile string after
/linkand after the link options for library path, so the entire string is passed to the compiler. See Visual Studio Linker options on MSDN.
- For gcc and clang++ added after
-Wl,so flags and argument should be comma separated rather than space separated. Flags with arguments can also be passed in
flag=argumentform. An example string would be along the lines of
If you want to set compile optimizations through the additional compile options, you may want to set the RCC++ optimization level to
RCCPPOPTIMIZATIONLEVEL_NOT_SET. See Controlling Optimization Levels.