Skip navigation
Galacta
Currently Being Moderated

WebP - Alchemy

Sep 1, 2012 7:37 AM

Tags: #actionscript3 #alchemy #webp

Hi everybody,

 

I'm a french student in computer science and I would like to make a wrapper in order to use the Google libwebp in ActionScript.

 

I started to write a main.c file which will allow me to make a bridge between AS3 and C libwebp using Alchemy.

 

The compilation works fine as long as I don't use the WebPDecodeARGB function. as soon as I call this function (uncomment the line), the Flex Compiler shows more than 100 errors in the console.

 

A piece of the errors :

 

  1. Morgan@Morgan-PC /cygdrive/c/alchemy/samples/WebPWrapper/libwebp
  2. $ gcc main.c -Isrc -O3 -Wall -swc src/libwebp.a -o WebPWrapper.swc
  3. Array @ARGV missing the @ in argument 1 of shift() at /cygdrive/c/alchemy/achacks/gcc line 218.
  4. WARNING: While resolving call to function 'main' arguments were dropped!
  5. WARNING: While resolving call to function 'stub_zero' arguments were dropped!
  6. WARNING: While resolving call to function 'stub_zero' arguments were dropped!
  7. WARNING: While resolving call to function 'stub_zero' arguments were dropped!
  8. WARNING: While resolving call to function 'stub_zero' arguments were dropped!
  9. WARNING: While resolving call to function 'stub_zero' arguments were dropped!
  10. WARNING: While resolving call to function 'stub_zero' arguments were dropped!
  11. WARNING: While resolving call to function 'stub_zero' arguments were dropped!
  12. WARNING: While resolving call to function 'stub_zero' arguments were dropped!
  13. [Compiler] Error #1071: Syntax error: expected a definition keyword (such as function) after attribute bswap, not i0.
  14.    6056.achacks.as, Ln 35823, Col 11:
  15.         bswap i0 =
  16.    ..........^
  17. [Compiler] Error #1084: Syntax error: expecting rightbrace before semicolon.
  18.    6056.achacks.as, Ln 35830, Col 18:
  19.                 mstate.esp -= 4;(mstate.funcs[___ashldi3])()
  20.    .................^
  21. [Compiler] Error #1131: Classes must not be nested.
  22.    6056.achacks.as, Ln 36022, Col 14:
  23.    public final class FSM_VP8GetSignedValue extends Machine {
  24.    .............^
  25. [Compiler] Error #1071: Syntax error: expected a definition keyword (such as function) after attribute bswap, not i0.
  26.    6056.achacks.as, Ln 36161, Col 11:
  27.         bswap i0 =
  28.    ..........^
  29. [Compiler] Error #1084: Syntax error: expecting rightbrace before semicolon.
  30.    6056.achacks.as, Ln 36168, Col 18:
  31.                 mstate.esp -= 4;(mstate.funcs[___ashldi3])()
  32.    .................^
  33. [Compiler] Error #1131: Classes must not be nested.
  34.    6056.achacks.as, Ln 36530, Col 14:
  35.    public final class FSM_VP8GetBit extends Machine {
  36.    .............^

 

etc ...

 

I put a link to my main.c on pastebin.com if you want to take a look : http://pastebin.com/q6UMfV5b

 

Anyone could help me please ?

Thanks a lot for you help.

 
Replies
  • Currently Being Moderated
    Oct 8, 2012 6:53 AM   in reply to Galacta

    I have some prolem, but can't find any solution, I found alchemy generated as3 code may miss information on some case.

     

    Code like below:

     

    //InlineAsmStart

    bswap i0 =

    //InlineAsmEnd

     

    i0 need assigned right value.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points