[Partly self-resolved] Can't manage to run 3DPrimitivesExample [exe looking for older 2.4 version of dll from ilmbase mingw package instead of actual 2.5 version]

Hi, i am totally new to oF and C++ project development. I am not totally beginner with compilation, Makefiles and linux command lines to compile simple code in C but it’s not fresh in my memory (10 years ago).

I started yesterday trying to setup my oF environment on a laptop under windows 8.1 64bit. After hours of troubles (see below) i managed to compile 3DPrimitives Example, using msys2 and 32bits-oF current release (msys2 32 bits link on the download page). But cannot manage to run it, because it fails to find fmodex.dll, which appears in the bin directory (same pb as mentionned here).

What i have tried?
-> make copy_dlls : still the same failure
-> try to find various occurences of that dll and make a copy in bin directory: still the same
-> try a restart in case there is a problem of updating my PATH variable: this had an effect but not the one i expected. Now the error is no more about the fmodex.dll but a “?” one?!?
image

In the 3DPrimitivesExample directory i then tried a make clean and make but still the same.
I also tried to run the example by double clic but i get another error:
missing libHalf-2_4.dll on my computer.

I appologize for these beginners issues, i’m still trying to fix it by myself but i would appreciate some experienced advises ! Thanks!

Just to let you know what i’ve done before in case it could play a role:

-> first tryed to install Visual Studio but I did not managed to install it (not have 23 Go available on C: drive because of disc partitionning and can’t manage to make it accept an install on my data partition)

-> so i changed for msys2. Following msys2 setup procedure i installed 64bit-mys2 and tryed oF-64bit current release with mingw64.exe : i manage to go through a first trouble but never passed the compilation of example 3DPrimitiveExample, with the same pb as mentionned in issue #5576

-> then i tried oF-32bit current release with mingw32.exe BUT still in my first 64bit-msys environment. Same failure.

-> reading again the issue #5576 i reinstalled mys2 using a 32bit-msys2 (link in the #5576 issue page) and then managed to setup 32bit-oF current release trough mingw32.exe. At this point compilation of 3DPrimitivesExample worked fine. But can’t manage to run it.

I managed to ruin my install, don’t know how, but i am no more able to compile the example on mingw32 command line :grimacing:

At the same time, i tried using Qt. Managed to get 3DPrimitivesExample compiling but still crashing at the moment of running it. So i thought it was linked to the missing dll “libHalf-2_4.dll” that i mentioned in my first post. It appears the lib was present but with a next 2_5 version. So i managed to downgrade it and it seem to work now, at least i get the visual of the example!

Don’t know if this method is the best one but in case it can help, i give below what i did.

The problem:
3DPrimitivesExample compiling but failling to run. When trying to run it by double clic on the file, i got a popup with smth like libHalf-2_4.dll missing on your computer

libHalf-2_4.dll (and a couple of other of the same msys2 package) was in fact libHalf-2_5.dll in my mingw32\bin directory.

To fix it by downgrading:
first download http://repo.msys2.org/mingw/i686/mingw-w64-i686-openexr-2.4.1-1-any.pkg.tar.xz and http://repo.msys2.org/mingw/i686/mingw-w64-i686-ilmbase-2.4.1-1-any.pkg.tar.xz.
Then in a mingw32.exe window, run:
pacman -U mingw-w64-i686-openexr-2.4.1-1-any.pkg.tar.xz mingw-w64-i686-ilmbase-2.4.1-1-any.pkg.tar.xz

Now it should work.

Hi, so can you build the other projects as well?
I have no experience with msys2 but every time I’ve needed to develop stuff for Windows I’ve used Visual Studio and it usually is quite trivial to install. Yet, it might be that Windows 8 is a bit old for the current releases of VS. I know it can be a hassle but, have you tried to upgrade to Windows 10 or install it on a different partition ?

Just as a tip, the Project Generator is your friend, so if you ever break a projects config you can us PG to update it or regenerate its configuration. This is specially needed if you want to use addons or projects from other people found online, always update these projects with PG.

1 Like

Thanks @roymacdonald for your interest on this and for the tip about PG. Concerning windows version, i’ve spend hours in the past to setup a dual boot with linux, i prefer not to try any upgrade. I’m not mastering that stuffs enough to manage it rapidly and with serenity.
By now i have been able to build and run all (7) other examples from various categories i 've tryed to: all works fine! except a pop-up window that always appears when it runs (from Qt Creator) the very first time, saying that application not succeed to start correctly. But it doesn’t affect the ability to run the example. I may have read smth about this somewhere, i have to check. Below is a screen capture of this error (in french).

It seems that besides this annoying message it works fine.

Bonjour olesno,

Sorry about the bad experience with the MSYS2 version of OF.
Unfortunately, as MSYS2 is a rolling release system (as Arch Linux), softwares get continuously updated and what was working one day may not be working the next day.
This is the case with the OpenAL trouble you had - a new version of OpenAL was released a few days after v0.11.

An important thing about MSYS2 is that they have 2 installer versions : the i686 version for 32 bits processor and the x64 version for 64 bits version. You should use the x64 version.

The x64 version comes with 3 flavors inside MSYS, MINGW32 and MINGW64. MINGW32 is to compile 32bits programs (that can run on 64 bits processor); MINGW64 to compile 64bits programs.

Mixing OF 32bits download with MINGW64 is a bad idea.

If don’t mind trying to install MSYS2 and OF again, I’ll be glad to help you.

Bonne chance

Bonjour @oxillo ,
thanks for your support!

In fact i’m not mixing OF32bit with MINGW64, sorry if it was not clear: i use OF32bits with MINGW32 coming from msys2-32bit installer.

But you’re right in the fact i made some mixing: firstly my windows is 64bits and secondly my msys2 directory was msys32 after install, which i renamed msys64, as it was mentionned here. Bellow is the extract of 9 Jul 2019 from darkworks:

image

My very first attempt to install oF environment was using x64 version of msys2. If you still think after my clarifications that i should try again to have something cleaner, i’m ok to try. In that case, should i try with msys2-64bits and MINGW64+oF64 or msys2-64bits and MINGW32+oF32?
And what about the N/A for stable branch and MSYS2 64bits we can see on gitub? It does not encourage me to try MSYS2 64bit again (but i confess i don’t know what it means).

image

Hello,

I’ve just discovered that my installation of MSYS2 is not working anymore. Not sure what is the reason yet. GCC has moved from 9.3 to 10.1, may be a Windows patch…,
I see kind of the same errors than yours. So, maybe you correclty followed the instructions but you were out of luck.
I’ll try to install on a different computer to find where the problem comes from.
the N/A for MSYS2 64 bits, really means MINGW64 on MSYS2 64bits. I think MSYS2 dropped support for MSYS2 32 bits (not available anymore on the website)

Hello olesno,

I confirm that your solution of downgrading openexr and ilmbase to 2.4.1 is the right one.
I’ve tested various solutions - going back to gcc 9.3 , not upgrading msys2_runtime,…
The problem appears when upgrading openexr (and ilmbase) to 2.5.
I’ve made all my tests with msys2 (64bits) and mingw64.

Bonne journée.

Bonjour @oxillo!

Thanks for the information! When i will have enough time i will try again my install with msys2-64 bits as you did. So with that configuration and downgrading openexr you manage to compile examples using make command?

Bonne journée.

To use with the release version, in addition to openexr, you’ll also need to downgrade openAL.

wget http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-openexr-2.4.1-1-any.pkg.tar.xz
wget http://repo.msys2.org/mingw/i686/mingw-w64-i686-ilmbase-2.4.0-2-any.pkg.tar.xz.sig
wget http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-openal-1.19.1-1-any.pkg.tar.xz
pacman -U *.pkg.tar.xz

To use addons, you’ll also need to downgrade make or to patch one makefile in OF. This solution is also applicable to MSYS2.

wget http://repo.msys2.org/msys/x86_64/make-4.2-1-x86_64.pkg.tar.xz
wget http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-make-4.2.1-4-any.pkg.tar.xz
pacman -U *.pkg.tar.xz

Bonjour @oxillo,
thank you for all this! Will be very helpfull.