Ho-To: Install Alchemy

For those of you who tried but didn't succed, I found some straigthforward instructions for this.

Setup Hell:

Install cygwin to "c:\cygwin" - make sure to check boxes to install Perl, "Archive" (ZIP), and Devel/gcc:g++ ( presumably) (is Perl necessary?)
Copy the alchemy directory to: c:\cygwin\home\Lee
Copy the flex sdk bin dir from c:\program files\etc to "c:\flex" (to avoid paths with spaces in it!)
Run the alchemy config script once:

   run cygwin
   cd alchemy

Edit the textfile "C:\cygwin\home\Lee\alchemy\alchemy-setup" and uncomment and edit line 22 to: add "export ADL=c:\flex\adl.exe"

Edit .bashrc (in C:\cygwin\home\Lee)

   echo "LEE PROFILE"
   export FLEX_HOME=~/flex
   export ALCHEMY_HOME=~/alchemy
   # "This should be added before your PATH is modified" !!
   source /home/Lee/alchemy/alchemy-setup
   export PATH

Do this (just once, I think):

   cd $ALCHEMY_HOME/bin
   ln -s llvm-stub llvm-stub.exe

Compiling a SW:

CD to the directory with the source
Always do "alc-on" before compiling, cuz it doesn't work without it even though i added it to the startup (dunno)

    gcc stringecho.c -O3 -Wall -swc -o stringecho.swc
    -- should give you a swc.

Import the swc into your flex builder 4 project and make sure compiler targets SDK v4


alc-home - takes you to the Alchemy install folder.
alc-on - puts Alchemy gcc toolchain replacements at the front of your path.
alc-off - restores original path.
alc-util - shows you various Alchemy-related environment vars


which gcc - tells you which gcc it will use (should be the one in the achacks dir)
ln - links shit
rm - deletes links as well as files

Ugh: Make sure to do "alc-on" and "alchemy-setup" even though you put it in the startup script 🙁 (?)




Comments (3) Trackbacks (0)
  1. Hi,
    I am new to Adobe Alchemy, I have a problem in compiling c file into swc using Alchemy gcc under cygwin. I have configured everything under Cygwin and environment paths also. But when I run the gcc command on the c file with the parameters “gcc test. -03 -Wall -swc -0 test.swc” it doesn;t compile the c file into swc file and it doesn’t even produce errors.
    Please help me to know what is wrong or what is going on in it?


  2. @Karthik
    Try to install all Perl packets. It solves my same problem.

  3. Nice tutorial. i tried to setup the Alchemy at my system

    i have windows 7, i read your tutorial and everything is setuped without an error but when i reopen the cygwin i got the following errors.

    1. :No Such file or directorylchemy-setup
    2. bash: alc-on: command not found.

    i already tried to troubleshoot and invest around two days, but no help.. can you please suggest me how can i setuped the alchemy. i am so excited to convert one of my C Lib into swc.

    Please help.

    One more thing. i have installed cygwin for all users, not only for me.

Leave a comment


CommentLuv badge

No trackbacks yet.