OpenFL basic install on Windows doesn't work? - haxe

I went to http://www.openfl.org/archive/download/ and followed the steps for a really basic first test:
haxelib install lime
haxelib run lime setup
lime install openfl
lime create openfl:DisplayingABitmap
When I try to run it with:
cd DisplayingABitmap
lime test neko
I get:
Export/windows/neko/haxe/ApplicationMain.hx:1: characters 7-20 : Class not found : openfl.Assets
I haven't done anything before with Haxe or OpenFL so this is a fresh install. Anybody can guess what's going on? It doesn't seem to be seeing the contents of the openfl library, though it can perfectly generate the project.
(update: I tried the exact same on a Mac and it worked perfectly, so I think the problem has something to do with Windows)

Try to follow the steps at http://www.openfl.org/documentation/setup/install-haxe/ and reinstall the latest openfl, the contents under "archive" folder are mostly outdated.

Related

How do I launch doxygen/perl from Monodevelop on linux/flatpak?

I have a mono-based project that is developed on Linux. Is there some trick to getting custom build steps to run in Monodevelop 7 packaged in flatpak?
The custom build steps that build the doxygen documentation and package it up do not launch. Doxygen and perl are both installed in /usr/bin, and the build steps work properly outside with the legacy monodevelop 5. Doxygen is "not found" and perl runs but is using an (apparently) flatpak builtin /usr/bin/perl that does not have any of the required CPAN modules.
How do I get custom build steps to run in monodevlop 7?
You don't. Flatpak will not run programs that are masked by its packaging, so for example you can not run python or perl scripts that require modules that are not part of the monodevelop flatpak package.
The best solution I can come up with is to launch everything from an external non-cross-platform Makefile, using msbuild for the C# compilation steps. The build does not have to be cross platform, as long as the end product is, so this is a workable, if lame, solution. At least this way you can run the program and debug unit tests in the monodevelop IDE.

Getting Error loading templates, please run 'flixel download'.?

i am getting, Error loading templates, please run 'flixel download'. after a fresh install on a windows pc.
Everything is freshly installed.
I tried :
i am confused what to do next ?
The error you get when you run haxelib path flixel-templates gives the relevant clue:
Error: Library lime version 2.9.1 is not installed
Flixel depends on older versions of OpenFL and Lime - Lime 2.9.1 to be exact, hence the error. You can solve this by running the following two commands (answer the "install it?" prompt with yes):
haxelib set lime 2.9.1
haxelib set openfl 3.6.1
Note that if you run haxelib install flixel, it should automatically install the correct versions of Lime and OpenFL. Perhaps you used a different setup?
Update: I've just released flixel-templates 2.4.5 and flixel-demos 2.4.3, which should avoid this issue altogether in the future.

How to cross compile Haxe/OpenFL generated source code using minGW?

I have got a CPP source files generated by OpenFL/Haxe for Linux (Fedora 21 x86_64).
I would like to attempt to cross-compile this to Windows executable using mingw-64 but does not know how to generate the proper Makefile for this as there where alot of cpp files in the scr folder.
How do I create this make file?
or
If there is an approach to configure OpenFL/Haxe to do cross compile using mingw-64 that would also be appreciated.
Compiling Windows program from linux was not available from OpenFl during that time, I created several pull requests and code updates to enable it, however, the attempt was turned down. I think its due to manageability and market. But idea of coding in Linux for every OS makes Linux a powerful coding platform!
It took quite sometime to solve it on my end since some codes in its haxe component was needed to be updated. I continued my research and ended up contributing few codes to OpenFl and Haxe/Hxcpp.
New problems in compilation have arised that are far more difficult to solve, Ret-Mode have proposed a better solution that time. For those interested, check here: https://github.com/Ret-Mode/lime apply his fix to your Lime installation. The method for cross-compilation is as follows:
Installation on Linux for crosscompilation
1 Clone repository
git clone --recursive https://github.com/Ret-Mode/lime
2 Setup:
haxelib dev lime lime
2a Rebuild tools (from lime/${version}/tools folder):
haxe tools.hxml
3 First build for Your linux architecture:
haxelib run lime rebuild linux -DHXCPP_M32 -32
haxelib run lime rebuild linux -DHXCPP_M64 -64
3a Build lime for MinGW, also choose Your MinGW arch:
haxelib run lime rebuild windows -Dmingw -DHXCPP_M32 -32
haxelib run lime rebuild windows -Dmingw -DHXCPP_M64 -64
4 Build projects for Your arch:
haxelib run lime build windows -Dmingw -64
haxelib run lime build windows -Dmingw -32
5 If You have WINE installed, You should have Your app icon swapped. If not, app will have native icon, but will work

OpenFL C++ Error: Could not guess MINGW_ROOT

I am new to OpenFL and were trying to get it to work for the first time. I have installed haxe, lime and openfl via command prompt, and installed Visual Studio Express 2010 using lime setup windows. But when I try to compile a brand new OpenFL project in Flash Develop targeting c++, I get the error "Error: Could not guess MINGW_ROOT (tried [c:/MinGW]) - please set explicitly".
Anyone had this problem before? or is there anything I have to configurate?
Thanks.
Hi your system is not yet setup for windows, check this link:
http://www.openfl.org/documentation/advanced-setup/platforms/setup-windows/
Basically you need to install Visual C++ and other stuff, luckily openfl have this automated. Just open the command prompt where openfl is and type:
openfl setup windows
Hope this helps!
For anyone that wants to know, it seems to work by installing mingw and setting the environment path. My mingw comes from Qt installation.
from console you can do something like
setx MINGW_ROOT "C:\Qt\5.6\mingw49_32\bin"
or
setx MINGW_ROOT "C:\Qt\5.6\mingw49_32\bin" /M

Unable to install Lime (HaxeFlixel)

I'm installing HaxeFlixel by the Getting Started guide (http://haxeflixel.com/documentation/getting-started/).
When I type haxelib install lime, it return:
You already have lime version 1.0.1 installed
[file_contents,C:\Program Files\Stencyl\plaf\haxe\lib/lime/.current]
and nothing happened.
I also uninstalled Stencyl program but it still return that although the C:\Program Files\Stencyl\... doesn't exist.
I would like to say that in comment but have not enougth reputation...
You can try haxelib path lime to see the path where is lime.
If it's tell you that it's already in your computer then this should already work.
You can also, check your haxelib path, by typing haxelib config this will tell you the directory setup for the libraries.
But you can also do haxelib remove lime, to remove the previous version of lime on your computer. And then try to reinstall it. Like that, you are starting with a brand new lime installation.
I found out an file in the folder C:\Users\YourUserHere.haxelib delete it and you should be good to go.

Resources