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

GLFW doesn't initialize #40

Closed
Panthr75 opened this issue Feb 5, 2021 · 2 comments
Closed

GLFW doesn't initialize #40

Panthr75 opened this issue Feb 5, 2021 · 2 comments

Comments

@Panthr75
Copy link

Panthr75 commented Feb 5, 2021

GLFW downloaded from: https://github.com/glfw/glfw/releases/tag/3.3.2 (WINDOWS 64)

File setup
-> GameEngine.Core.exe
-> glfw.dll (renamed from glfw3.dll in zip at /lib-vc2019)
-> glfw.lib (renamed from glfw3.lib in zip at /lib-vc2019)
-> glfwdll.lib (renamed from glfw3dll.lib in zip at /lib-vc2019)

Crash:
image

@Panthr75
Copy link
Author

Panthr75 commented Feb 6, 2021

Right now it appears to be resolved, but there may be more trouble down the line, as the solution was to change my build format from x86 to x64

@Panthr75 Panthr75 closed this as completed Feb 6, 2021
@ForeverZer0
Copy link
Owner

The BadImageFormat means that the native DLL and managed assembly have mismatched CPU architecture (i.e. you are building x86 assembly, but referencing native x64 libraries, or vice-versa). GLFW offers binaries for both architectures, though your managed assembly will need to be built with the matching architecture.

32-bit Binaries
64-bit Binaries

If you want to build your project for for x86, you would only need to get the native x86 DLL to make it work.

On a side note, the only binaries you need are the .dll ones, not the ones with .lib extension. The .lib files are mainly for static linking in C/C++, you only need the dynamic ones.

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

2 participants