Hello all,

I am compiling a library successfully in Flex Builder but when i try with ANT 
it gives me a compiling error:

/Users/bounce/Documents/myproj/CommonLibrary/src/net/myproj/models/Update.as(11):
 col: 14 Error: Type was not found or was not a compile-time constant: Company.
     [exec]             public var Company:net.myproj.models.Company;

Now admitedly it's not nice to have the varaible name the same as the type 
Class but it works in FB so it should work with compc.

Any idea what FB is doing differently?

Here is my ANT script:

<?xml version="1.0"?>
<project name="CommonLibrary" basedir="../" default="lib">

        <!-- Define variables/paths used in this build script -->

        <property file="./build/build.properties" />

        <!--
                Have you edit the properties file to make sure the paths are 
right oo your system?
        -->
        <target name="properties">
                <fail unless="compc.exe">The "compc.exe" property must be set 
in ${build.dir}/build.properties.</fail>
                <fail unless="mxmlc.exe">The "mxmlc.exe" property must be set 
in ${build.dir}/build.properties.</fail>
        </target>

        <!--
                Compile all of the classes under the "src" tree into a .swc file
        -->
        <target name="lib" depends="properties">
                <exec executable="${compc.exe}" dir="${basedir}">
                        <!-- Specify the name of the output file -->
                        <arg line="-o '${bin.dir}/${library.name}.swc'" />
                
                        <!-- Include the necessary framework libraries as 
external libraries -->
                        <arg line="-el '${flex3sdk.lib.dir}'" />
                        
                        <!-- Include in the corelib.swc as an external library 
-->
                        <arg line="-el ${corelib.swc}" />
                        
                        <!-- Specify the main source path as "src" -->
                        <arg line="-sp ${src.dir}" />
                        
                        <!-- Include all of the classes in the "src" tree -->
                        <arg line="-is ${src.dir}" />
                </exec>
        </target>
        
</project>

Thanks for your help.



Reply via email to