Compile C ++ into flash. Getting started with flascc

Source: Internet
Author: User
Alchemy
2 (flascc) beginner (Windows)

Alchemy 2 (flascc) beginner (Windows)

Coleryu

The prerelease version of Adobe alchemy (alchemy) 2 is open to developers and has been renamed flascc. The Alchemy is simply to compile C/C ++ code into a SWF file, which absorbs the efficient execution efficiency of C/C ++, which is more efficient and smoother than the traditional development SWF, it can also be used across platforms. The famous 3D Game Engine unreal 3 uses alchemy 2 technology to perfectly implement web falsh3d game, demo address http://www.unrealengine.com/flash/ demo.

Step 1: Get flascc

Official flascc website http://gaming.adobe.com/technologies/flascc/

If you already have a prerelease account, you can directly join the flasscc project to join the flascc prerelease project.

New users register prerelease accounts and join Adobe prerelease now

After registration, you can download the pre-release flascc.

Here we download the win build version.

Step 2: install and configure the environment

Windows flascc requires cygwin, which is a UNIX simulation environment running on Windows platforms. In earlier versions of alchemy 2, cygwin needs to be downloaded and installed. The latest flascc SDK already comes with this environment, making installation easier and easier.

1.decompress the compressed package flascc_1.0.20.1790_10-08-2012.zip to the hard disk, such as C:/flascc.

2. install Java environment http://www.java.com/zh_CN/download/help/index_installing.xml

3. Configure the Java environment http://www.java.com/zh_CN/download/help/path.xml (the new version of JRE will automatically configure the Java environment after installation)

4. Download the flex SDK and decompress it to C:/flex_sdk.

5. Double-click Run. BAT to run

6. Check whether the development environment of flascc is OK.

1. CD 01_helloworld

2. modify c: \ flascc \ tutorials \ makefile. common file, replace flascc: = x flex: = x with flascc: =/cygdrive/C/flascc/SDK flex: =/cygdrive/C/flex_sdk

3. Make

4../Hello

5. Run hello.swf

Now we can start our alchemy journey :)

Step 3: Compilation case

1. Download The pak0.pak file online and put it in the example_quake1 directory.

2. CD example_quake1

3. Make pak0file =/cygdrive/C/flascc/tutorials/example_quake1/pak0.pak

After compilation, run quake1.swf and quake1mt.swf to run quake1.swf, as shown in figure

Note: FAQs

1. "error: llvm error: Error: unable to launch the Java Virtual Machine. This usually means you have a 32bit JVM installed or have set" appears when you execute make.
Your Java heap size too large. try lowering the Java heap size by passing "-jvmopt =-xmx1g" to GCC/g ++ ....." The solution is that the 64-bit operating system can download the 64-bit version of Java for installation, the operating system is 32-bit. You can add the-jvmopt =-xmx1g parameter after gcc/g ++. For example, you can modify the MAKEFILE file in the 01_helloworld directory when compiling 01_helloworld.

 

Http://www.todoair.com/alchemy-2-(flascc) beginner-(Windows-version)-2012-10-24/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.