vaca icon indicating copy to clipboard operation
vaca copied to clipboard

[MSYS2 MINGW64] Unable to run any compiled examples

Open ghost opened this issue 1 year ago • 5 comments

HelloWorld.exe - Application Error

The application was unable to start correctly (0xc000007b). Click OK to close the application.

ghost avatar Apr 12 '23 12:04 ghost

If you have compiled the dynamic version of the library, you have to copy the .dll where the .exe is located so the .exe can find it. But I'm not sure if that might be the error (I compiled vaca with msvc, so not sure if the mingw is working correctly)

dacap avatar Apr 12 '23 12:04 dacap

If you have compiled the dynamic version of the library, you have to copy the .dll where the .exe is located so the .exe can find it. But I'm not sure if that might be the error (I compiled vaca with msvc, so not sure if the mingw is working correctly)

cmake automatically places libvaca.dll next to the compiled examples.

ghost avatar Apr 12 '23 12:04 ghost

I gave a try, after copying all the other missing DLLs (that are located in /mingw64/bin), the error is still there:

image

image

image

image

Even compiling the static version of the library. So basically I don't know what could going wrong. I'm not using MinGW compiler in a long time (probably 10 years) and it looks like the toolchain changed a lot (I have to be sincere, it looks quite messy). At the moment vaca can be compiled with MSVC and the examples should run correctly.

dacap avatar Apr 14 '23 19:04 dacap

It looks like the problem is because the program is compiled for 64-bit but some DLL is in 32-bit (or viceversa).

dacap avatar Apr 14 '23 20:04 dacap

It looks like the problem is because the program is compiled for 64-bit but some DLL is in 32-bit (or viceversa).

You have to check your build script. This is what I found when I searched about this error on Google too. But it's very unlikely the problem is from MSYS2. The MINGW64 environment is 64 bit only so it's very unlikely any 32 bit DLL was linked.

ghost avatar Apr 15 '23 05:04 ghost