• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

SOLVED Unable to Load Extension Libraries on Compile

Hi,

Recently I've been trying to use dlls and extensions to get my game to communicate with Discord Rich Presence etc. However more recently I've had the following error message spammed in the output when trying to compile the project:


LoadLibraryW Y:\[Project & Library Names] failed with error code 126

I looked this up online but the main posts I found stated that the code should say 'LoadLibraryA' not 'W' and those had errors coming through Windows too whereas I only see this error inside GMS2's output window when compiling. Regardless I followed the steps which mainly consisted of two causes:

1. Windows has some corrupt/missing dll files. So I ran the checker through elevated command prompt and it came back as everything was fine and normal so unlikely to be that.

2. An issue with multiple GPUs running the app or something along those lines? In all fairness, I do have a laptop with both integrated and discrete GPUs so I thought this could be a cause so I went into control panel and tried to force GMS2 to run on one then the other (by default it runs on the integrated chip) both produced the same result which left me stumped.

Especially as when I coded this on an older laptop (which had the same 2 GPU setup) it ran without fault until an IDE update which stopped it from working about 1-2 weeks ago I think? Originally I didn't see the error messages and only noticed as my game stopped communicating with Discord and since I was busy I said "I'll fix this later" since I thought my code had broken or something as I had changed a lot of stuff since implementing it. So I'm very confused by this. I also tried reinstalling both the Extension and GMS2 and even tried a different extension made by someone else. Still brings this message up. All my drivers are up to date as well as Windows itself which doesn't help in this situation.

Thanks for reading.

UPDATE: So I managed to get this working after changing with some settings and found out it was because I forced the IDE to run the 64bit runner at some point (don't remember changing it but whatever) whilst the DLL is only 32 bit causing the error. Reverting it back solved the issue.
 
Last edited:
Top