Quick Update

Just a quick update to let you know things are still moving forwards. I have not done very much iPhone specific stuff recently, but I have been working on the graphics code base in general. The idea is to separate the graphics code from SDL (although still use SDL most of the time) to avoid GPL issues and also allow the library to be used in a wider set of applications rather than just games. For example, inside a window in a larger desktop application, or inside Google’s Native Client plugin. Another goal is to improve rendering speed by minimising the amount of data moved between haxe and the graphics code – this involves moving code logic from haxe into c++. I have also been looking at a few minor tweaks such as setting object widths/alphas like flash does.

Once this is done and moved into Neash/NME, I will fix a few of the remaining issues on the C++ backend – maybe even get to add dynamic properties to the runtime. I would also like to spend a bit of time finishing off the internal garbage collection to make it thread-safe and run automatically – this could solve some of the problems compiling boehm-gc on various systems.

And, of course, I would like to write more tutorials…

16 Replies to “Quick Update”

    1. Hi Andy,
      Yes, it would be reasonably easy since there seems to be a well-defined API you could just “wrap”. This would be a separate project to the flash-based API stuff I have been doing, but you would get the language benefits from haxe. Lee over at DesignRealm is probably the most experienced person when it comes to wrapping existing libraries.

  1. I am not yet using C++ with Haxe, as I am struggles to understand how it works.
    nicolas told me that I need to install the C compiler from MS. I really do not want to install Visual C++.
    Can I use another compiler instead, if yes which one would recommend.

    I am following your work very closely, as I admire it very much.

    Tank you for your work on this.

    1. Hi Pix’nlove
      The MS compiler is free and good, so it is the only officially supported compiler on windows.
      The code compiles on gcc on the other platforms so that would be a logical alternative, but some of the conditional compiles may not work.
      If you have experience porting code, you could change the “BuildCommon.xml” file, in the WINDOWS TOOLS section, to set the compiler executable and flags you rerquire (you may be able to copy them from the linux section) – you cay also need to change include/hxObject.h and possibly other include files.
      So it can be done, but may require some work.

      Huge

    1. Hi robo,
      To avoid the cmd window, you need to get the “-subsystem:windows” on the commandline.
      You can edit the BuildCommon.xml file yourself to add this flag.
      Alternatively, you can compile to a library, and then link this library against a “normal” Visual Studio project – this would allow you to set the icon etc. Something very similar to this is done on the iPhone.
      However, to do this you would also need to edit the BuildCommon.xml file to add a “static” link section on windows, which is not trivial. I will look to make this easier in the next release. Let me know if you would like some more hints in this area.

      Hugh

  2. thank you for your reply,
    current neash version have a problem is that
    scarygirl example can’t build ,
    show some error about the movieclip can’t be draw .would you check it?

  3. I have downloaded 2.05.1 version and next error is generated (version 1.0.7 does not have that error):

    ./src/haxe/Log.cpp(125) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add ‘#include “hxcpp.h”‘ to your source?

  4. Hi Fedor,
    Looks like you might be running a hybrid version. Things that you could check: haxe version 2.05, haxelib list -> 2.05.1, $HCPPP is empty, src/haxe/Log.cpp actually includes hxcpp. Also, try deleting the output directory and running again.

    Hugh

  5. Hi, Hugh.

    HXCPP is
    C:Program FilesMotion-Twinhaxelibhxcpp2,05,1

    haxelib list
    hxcpp: 1.0.7 2.05.0 [2.05.1]

    Output folder deleted – the same error. Checked the path – it does not contain previous hxcpp pathes.

    Fedor

  6. The first line of the Log.cpp

    #include <hxObject.h>

    The log of the compile:

    cl.exe -Iinclude -nologo -O2 -MT -DHX_WINDOWS -GR -Zi -c -EHsc -IC:Program FilesMotion-Twinhaxelibhxcpp2,05,1/include -D_CRT_SECURE_NO_DEPRECATE -wd4996 -Ychxcpp.h __pch.cpp /Fphxcpp.pch
    __pch.cpp
    cl.exe -I. -nologo -O2 -MT -DHX_WINDOWS -GR -Zi -c -EHsc -IC:Program FilesMotion-Twinhaxelibhxcpp2,05,1/include -D_CRT_SECURE_NO_DEPRECATE -wd4996 -Iinclude -Yuhxcpp.h ./src/haxe/Log.cpp -Foobj/Release/src/haxe/Log.obj
    Log.cpp
    ./src/haxe/Log.cpp(1) : warning C4627: ‘#include <hxObject.h>’: skipped when looking for precompiled header use
    Add directive to ‘hxcpp.h’ or rebuild precompiled header
    ./src/haxe/Log.cpp(4) : warning C4627: ‘#include <haxe/Log.h>’: skipped when looking for precompiled header use
    Add directive to ‘hxcpp.h’ or rebuild precompiled header
    ./src/haxe/Log.cpp(125) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add ‘#include “hxcpp.h”‘ to your source?

  7. Hi Fedor,
    That version of the file is definitely created by haxe 2.04, not 2.05. So I suspect you have an old version of haxe in your executable path somewhere. If you just run haxe on its own, what version does it say it is? The only other thing I can think of is if the old file is not getting deleted because of UAC or something.

Leave a Reply

Your email address will not be published. Required fields are marked *