Hello OpenFl-Community,
I am trying to publish an executable for Windows.
After compiling to the C++ target on my Windows 8 computer, the game ran fine. On another machine however, both libgcc_s_dw2-1.dll and libstdc+±6.dll are missing. (I’m guessing it ran fine on my pc, because both libraries are in my PATH-variable)
After googling the error, some recommended adding the arguement ‘-static’ to the Mingw command. So my questions are the following
-
How do I define Mingw arguments in OpenFl?
-
or How do I link these libraries in an easier way?
Thanks in advance!
Edit:
I tried to reinstall haxe and OpenFl and went trough ‘openfl setup windows’. Now I get an error on ‘lime@lime_application_create__1’, when executing on a different machine.
Edit 2:
I ran the the build command with the argument ‘-static’. The application can be built and ran, but during the build I got the following error:
Error: error running link.exe -out:Main.exe -nologo -machine:x86 -subsystem:windows,5.01 -libpath:lib user32.lib “@D:/Dateien/Projekte/2015/W÷hlerschule BLL/build/windows/cpp/obj/obj/msvc16-stat-ncxp/all_objs” C:\Users\Bausch\flow/hxcpp/3,2,205/lib/Windows/libstd.lib C:\Users\Bausch\flow/hxcpp/3,2,205/lib/Windows/libregexp.lib C:\Users\Bausch\flow/lime/2,7,0/ndll/Windows/liblime.lib C:\Users\Bausch\flow/hxcpp/3,2,205/lib/Windows/libstd.lib C:\Users\Bausch\flow/hxcpp/3,2,205/lib/Windows/libregexp.lib C:\Users\Bausch\flow/lime/2,7,0/legacy/ndll/Windows/liblime-legacy.lib C:\Users\Bausch\flow/hxcpp/3,2,205/lib/Windows/libstd.lib C:\Users\Bausch\flow/hxcpp/3,2,205/lib/Windows/libregexp.lib C:\Users\Bausch\flow/lime/2,7,0/legacy/ndll/Windows/liblime-legacy.lib gdi32.lib opengl32.lib user32.lib kernel32.lib advapi32.lib winmm.lib imm32.lib ole32.lib oleaut32.lib version.lib ws2_32.lib wldap32.lib shell32.lib comdlg32.lib libApplicationMain.lib
Again, the game won’t run on a different pc.
#Edit 3: Solved
After going trough the same procedure on a clean system, I noticed my mistake. To build static executables you have to build the lime-library from source. The app now starts, even on other machines.
However when I enter the game itself, the application quits without an error. I created another thread for this reason.