Binary Module Failing to Start

I am working on a new binary module, It includes LibCURL
Now it conmpiles okay but everytime I try to run it, i get this error:

error loading module ‘GS3’ from file ‘e:\program files (x86)\steam\steamapps\kittykatgirl\garrysmod\garrysmod\lua\includes\modules\gm_GS3.dll’:
The operating system cannot run %1.

Does anyone know what could be causing it?

Post the source.

If you don’t its unlikely anyone will help you.

Ok, although it is only the basic skellington right now, had not even added in anything more then basic init to see if it worked:
[cpp]
// Skip rarely used Windows API functions
#define WIN32_LEAN_AND_MEAN

// Headers
#include <GMLuaModule.h>
#include <curl/curl.h>
// Module definition
GMOD_MODULE( Init, Shutdown );

// Globals
ILuaInterface* g_Lua;
CURL* curlHandle;
LUA_FUNCTION( PrintSomething )
{
g_Lua->Msg( "Hello, there!
" );
return 0;
}
// Initialization
int Init( lua_State *L )
{
g_Lua = Lua();
g_Lua->SetGlobal( “PrintSomething”, PrintSomething );
curlHandle=curl_easy_init();

return 0;

}

// Shutdown
int Shutdown( lua_State *L )
{
curl_easy_cleanup(curlHandle);
return 0;
}
[/cpp]

[editline]30th March 2012[/editline]

Basically, I was trying to just get this to work before I start on the meat of the problem

Just asking right ahead, you have the curl.dll in the same folder as the hl2.exe ?

I have libcurl.dll in both garrysmod/bin and garrysmod/garrysmod/bin as I was unsure which

[editline]30th March 2012[/editline]

Put it in the same directory as hl2.exe, and same error, however, when I dont put libcurl.dll in Garrysmod/bin I get a different error:
error loading module ‘GS3’ from file ‘e:\program files (x86)\steam\steamapps\kittykatgirl\garrysmod\garry smod\lua\includes\modules\gm_GS3.dll’:
The specified module could not be found.

this leads me to believe I have the dll in the right place, but something else is wrong.

[editline]30th March 2012[/editline]

I have tried adding zlib1.dll in the same places, in case it was the lack of that.

Well I tried a different version of libcurl, and I got a different error alltogether:
error loading module ‘GS3’ from file ‘e:\program files (x86)\steam\steamapps\kittykatgirl\garrysmod\garrysmod\lua\includes\modules\gm_GS3.dll’:
The specified procedure could not be found.

I know this is old, but did you ever find a solution to this. I have the same problem when trying to use cURL in a gmod module.

edit: I got it working by putting libcurl.dll in garrysmod/bin. Is there a way to get around this? Like if I want to give it to someone else, is there a way to like include the libcurl.dll inside my module?

You guys should be linking the static library when compiling your modules, theres no need for the libcurl.dll to be in the same place as your dll (or in this case the program executing our dll). Also for the OP, it’s likely you need to update your runtime.