PDA

View Full Version : AIR AIR classes don't compile with CompC



duncanhall
August 7th, 2008, 07:23 AM
I've been using compc with ANT to compile some of my class files into SWC files. This all works well, until any of the classes to be compiled contain a reference to any of the AIR classes. At this point I start getting the following type of error:

col: 39 Error: Type was not found or was not a compile-time constant: NativeWindow.
col: 46 Error: Type was not found or was not a compile-time constant: File.
col: 23 Error: Definition flash.desktop:NativeApplication could not be found.

It only seems to be any of the AIR packages/classes that cause a problem, so I'm really hoping they are not just simply exempt from compilation.

If anyone knows how I can get around this, I would very much appreciate the help.

Thanks.

duncanhall
August 7th, 2008, 08:34 AM
After a not unconsiderable amount of frustration I now realize the problem is simply that I'm an idiot.

For compiling AIR classes, use ACompC rather than CompC! :sure:

devonair
August 7th, 2008, 02:55 PM
for the record, amxmlc will also work for AIR compilation.. Adobe definitely has a lot of compilers running around..

duncanhall
August 9th, 2008, 06:43 AM
Yeah, this is strange because I've always been using plain old mxmlc and never encountered any problems/issues. Do you know what, if any difference it makes using amxmlc?

kiteflo
February 19th, 2010, 04:43 AM
Hey DUncan,

can you tell me how you managed to trigger the acompc task as an ant target? As I'm banging my head against walls trying to do sth like this:

<acompc output="${FLEX_LIBS}/${PROJECT}.swc"
include-classes="${project_classes_property}"
target-player="10.0.0"
actionscript-file-encoding="UTF-8"
incremental="true"
configname="air">
...
..
.

any ideas?

Thanx in advance, Florian;


I've been using compc with ANT to compile some of my class files into SWC files. This all works well, until any of the classes to be compiled contain a reference to any of the AIR classes. At this point I start getting the following type of error:

col: 39 Error: Type was not found or was not a compile-time constant: NativeWindow.
col: 46 Error: Type was not found or was not a compile-time constant: File.
col: 23 Error: Definition flash.desktop:NativeApplication could not be found.

It only seems to be any of the AIR packages/classes that cause a problem, so I'm really hoping they are not just simply exempt from compilation.

If anyone knows how I can get around this, I would very much appreciate the help.

Thanks.