title: How to specify swc when building a swf?
body: <p>I have implemented some utility classes in Flex that I want to use in multiple AIR projects. I have created a swc which contain these classes. I am working on a Linux machine and do not have FlashBuilder. So I am using the compc and mxmlc command line SDK tools. My problem is that I have not been able to find a way to specify the swc when building the standalone project. A tutorial suggested the following command:
  <code>mxmlc -load-config /opt/flex/4.1.0/frameworks/air-config.xml -library-path=/path/to/utility.swc hello.mxml</code>. However, using that gives me the error <code>hello.mxml: Error: Unable to locate specified base class 'mx.core.WindowedApplication' for component class 'hello'</code>. Everything works fine if I move all code from the swc to a single monolithic pro ject. Can anyone help me out here? The code for the standalone project is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" windowComplete="completeHandler();"&gt;
  &lt;mx:Script&gt;
  &lt;![CDATA[
  import com.example.Ext;
  private function completeHandler():void
  {
      var e: Ext = new Ext();
      e.hi();
  }
  ]]&gt;
  &lt;/mx:Script&gt;
  &lt;mx:Label text="Hello World" /&gt;
  &lt;/mx:WindowedApplication&gt;
  </code></pre>
  
  <p>The type Ext is contained in utility.swc.</p>
  
  <p>UPDATE:
  I fixed the previous error. The commandline should have been <code>mxmlc -load-config /opt/flex/4.1.0/frameworks/air-config.xml -library-path+=/path/to/utility.swc hello.mxml</code>. This appends my swc to the existing library path instead of replacing it. However, I have a new problem. Now the error is <code>hello.mxml(10):  Error: Type was not found or was not a compile-time constant: Ext.</code> I am pasting the code for utility.swc as well:</p>
  
  <pre><code>package com.example {
      public class Ext {
          public function Ext {
              // do something
          }   
          public function foo( ): void {
              return;
          }   
      }   
  }
  </code></pre>