tags:

views:

980

answers:

2

I am trying to force all of the classes in a .swc to be linked into my Flex project's resulting SWF file. From the docs:

http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_03.html

include-libraries library [...]

Links all classes inside a SWC file to the resulting application SWF file, regardless of whether or not they are used. Contrast this option with the library-path option that includes only those classes that are referenced at compile time. To link one or more classes whether or not they are used and not an entire SWC file, use the includes option. This option is commonly used to specify resource bundles.

Unfortunately this only seems to work in my Flex Builder project when I specify the absolute path to my .swc as an argument. My .swc is in the "lib" directory which is added as a "SWC Folder" in my Flex project config. Does anyone know the syntax to reference it relatively?

+1  A: 

I always use:

mxmlc [...] -library-path+=lib/whatever/default/ [...]

Boris
A: 

If you are talking about compile-time only, that information is in the .actionScriptProperties file in the project directory.

The entries look like:

<libraryPath defaultLinkType="1">
  <libraryPathEntry kind="3" linkType="1" path="/OtherProjectInTheSameWorkspace/bin/LibName.swc" useDefaultLinkType="false"/>
  <libraryPathEntry kind="1" linkType="1" path="lib"/>
</libraryPath>

Note that the second libraryPathEntry is a relative path to the lib/ directory in the current project.

If the SWC is in its own project, then the path will start relative to the root directory of the workspace.

Cheers

Richard Haven