Search code examples
androidc++visual-studio-2010havokscaleform

Havok Vision Game Engine: Compiling Autodesk Scaleform For Android in Visual Studio


I've followed the instructions in the tutorial on Scaleform http://www.projectanarchy.com/introduction-scaleform

On windows it all worked fine, but now I am trying to compile it for Android in Visual Studio 2010 and I get all these errors:

Error 1 error MSB6006: "C:\Android\NDK\android-ndk-r9d\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin\arm-linux-androideabi-g++.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\hkAndroid\Microsoft.Cpp.hkAndroid.Targets 66 6 CounterUIApplication

and errors like this:

8   IntelliSense: cannot open source file "Vision/Runtime/EnginePlugins/ThirdParty/ScaleformEnginePlugin/VScaleformVariable.hpp"    c:\game engineering projects\scaleformtry\scaleformcounterui\counterui\source\counteruiapplication\main.cpp 18  1   CounterUIApplication

and like this:

31  IntelliSense: identifier "VISION_PLUGIN_ENSURE_LOADED" is undefined c:\game engineering projects\scaleformtry\scaleformcounterui\counterui\source\counteruiapplication\main.cpp 99  3   CounterUIApplication

It seems that Visual Studio does not load the scaleform header files in the Android solution.

How do I fix it? (Note: I've checked the Scaleform toggle box in the vGameSolutionCreator of the Vision Engine)

Thanks.

(I've asked this question already on Havok PA website but got no answer for a long time)


Solution

  • I've found the answer.

    After sitting in front of my computer for 8 hours I've found that the problem was caused by the Windows specific line in my source code (hkvLog::FatalError is not supported on Android):

    if(m_spMovie==NULL)
    {
     hkvLog::FatalError("Could not load movie: %s", m_sMovieName);
    }
    

    After I removed this line the program compiled with no problem and the apk was created.