Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Apr 12, 2023 · 5 comments
Open

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

ghost opened this issue Apr 12, 2023 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 12, 2023

HelloWorld.exe - Application Error

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

@dacap
Copy link
Owner

dacap commented Apr 12, 2023

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
Copy link
Author

ghost commented Apr 12, 2023

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
Copy link
Owner

dacap commented Apr 14, 2023

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
Copy link
Owner

dacap commented Apr 14, 2023

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

@ghost
Copy link
Author

ghost commented Apr 15, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant