dacap / vaca

C++ Win32 wrapper to develop GUI apps
https://github.com/dacap/vaca/wiki
MIT License
99 stars 20 forks source link

[MSYS2 MINGW64] Unable to run any compiled examples #11

Open ghost opened 1 year ago

ghost commented 1 year ago

HelloWorld.exe - Application Error

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

dacap commented 1 year ago

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)

ghost commented 1 year ago

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.

dacap commented 1 year ago

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 commented 1 year ago

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

ghost commented 1 year ago

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.