I’m Thomas … new here and nice meeting you (upfront). We’re gonna chat for some years from now on.
I have a simple question and i am pretty sure there is an easy answer. I can compile for HTML5 and Flash … no problem there but i would like to be able to compile to the entire list (HTML5, Flash, Windows, Neko … and so on).
Only Flash and HTML5 works. The rest says “Build Failed”.
I searched on the web and says to run: “lime setup windows” and it asks me if I want to install Visual Studio C++ Express. I already have installed Visual Studio 2013 and it has everything. I need that to work because I also program in C# and I don’t want do mess anything up and not be able to work for 2 days. Reinstall Windows and the entire nightmare.
Have you tried the samples?
openfl create PiratePig
openfl test neko
openfl test windows
If you get errors, what do you get? You don’t need Visual Studio C++ Express, you just need a Win32-compatible VSC++ install, it should find it using environment variables
no i didn’t. Will try now. But what i am running now it’s just a basic code with 2 classes. 1 for images 1 for sounds.
It’s a good sanity check, just to be sure we’re looking at the same thing. If you get errors, please post them and we’ll figure it out
I had VS 2015 already installed and so had the same question.
I followed @singmajesty’s suggestion, and it just worked without any setup.
I have a similar problem targeting windows.
Your suggestions led me to the error: mspdb100.dll is missing from your computer.
Tried reinstalling visual studio 2010 several times and added Microsoft Visual Studio 10.0\Common7\IDE to Path.
Same problem persists.
If VS2010 is not working well for you, try a newer version? “setup” is meant as a helper for Windows, it isn’t actually required – you just need a copy of VS installed and working
Tried VS2015 with 2010 installed and not installed. Still getting the same error. Is there a place where I can direct OpenFL to the VS2015 location?
This error specifically, along with a whole bunch of others
Error: error running cl.exe -Iinclude -nologo -DHX_WINDOWS -D_USING_V140_SDK71_ -GR -O2 -Oy- -c -EHs -GS- -arch:SSE
Did you reboot after installing?
Yep, I made some progress after adding LIB and INCLUDE to environment variables but I’m thinking there’s another path that needs to go in there somewhere.
I’m now getting:
fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory
It started to compile at least
Resolved, took a while to find windows.h but just added the directory to the include path and everythings working fine now.
Hi Calipsos, how you add LIB and INCLUDE to enviroment variables? i´m getting the same error:
Error: error running cl.exe
Go to control panel > system & security > system > advanced system settings
Click on advanced tab, then click environment variables
Under system variables click new
Variable name = INCLUDE, variable value = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
Click ok then click new again
Variable name = LIB, variable value = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
You may have to edit those addresses if your lib and include files are located somewhere else.
Just type OpenGL windows build -vs12 or -vs14
-vs12 means Visual Studio express 2013.
-vs14 means Visual Studio community 2015 or express 2015
Did you try?
Hey guys, since I had this problem as well I thought I’d post the solution that worked for me all in one post. Note that I am using Windows 7 64-bit, and started out from a corrupt VC 2010 install.
- Uninstalled VS 2010
- Re-installed VS 2010
- Restarted computer (this resolved initial woes with errors telling me to re-install Visual C++ stuff)
- Added VS 2010 bin and IDE folders to my user PATH: (This resolved missing cl.exe and mspdb100.dll errors respectively)
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
- Added the following INCLUDE and LIB user variables: (This resolved missing c++ header file errors, thanks @Calipsoo!!)
INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
LIB = C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
This seems like it might need to be documented somewhere, since I have a feeling that not all Windows development environments will be able to build right to the windows target out the box with a basic OpenFL setup.
Hope this helps someone!
Well it seems like (ideally?) there is a fix for VS2010 that works with the HXCPP batch file that is meant to pull in the VS environment:
This works for me with the older free editions and the current VS community release, but maybe there’s a fix needed for VS2010?
Interesting you should point that out @singmajesty, I also happen to have the Microsoft Visual Studio 14.0 folder installed but that version doesn’t have the cl.exe inside the VC/bin folder like Visual studio 2010 does. OpenFL was complaining about that file missing so that’s when I went and re-installed VS 2010 and updated my PATH manually and got it working.
Makes me wonder if at installation time my machine was set up for 14.0 and I assumed I needed 10.0 (2010) due to the error messaging I was seeing. I don’t see any remnants of any changes being made to my PATH from that msvc-setup.bat but that does seem to hint at what the problem could have been. Perhaps it was never executed
Visual Studio should define an environment variable on your system, which shows that its installed. Then HXCPP uses this batch script to import all of the variables for the latest version of MSVC (though there’s a HXCPP define for using an older one, I forget what its called at the moment) only during the build, so it doesn’t set it in your environment all the time
Oh I see, this is beginning to make a lot more sense. I’m afraid to touch my installation any further now that it’s working, but I do get the impression that the chronological order matters in how these tools are installed. On my machine I had OpenFL installed already from years ago, and only recently got back into it and tried upgrading everything one by one. Who knows what version of VS I had installed at the time (or if that bat even existed) which could have put me in such a wonky state.
There is still the mystery behind why my VS 14.0 folder doesn’t have the
cl.exe like the others on my machine which hxcpp demanded, but I think there are enough steps in this topic for people to be able to fix this issue when it comes up.