Hey guys, I'm not sure about the legality of distributing the libcurl project here so I'm just going to explain what you need to do:
1. Download libcurl source code(
http://curl.haxx.se/download.html ) and extract it somewhere
2. Download
CMake and use it to create an MS Visual Studio solution of libcurl
3. Copy and add these files from
GStudio8\sdk_plugin folder to the libcurl project:
- adll.cpp
- adll.h
- afuncs.h
- atypes.h
- avars.h
- cmd.h
4. Copy adll.lib to somewhere accessible from the project and make the project link against it by adding it to the "Additional Dependencies" at Project Properties/Linker/Input
5. Add these two files to the project as well:
main.h
#include<Windows.h>
#define DLL_USE
#include "gstudio/adll.h" // depends on where you placed adll.h
main.c
#include "main.h"
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
// make sure the library is linked
engine_bind();
return TRUE;
}
If everything goes well, you'll get a libcurl.dll you can plug into the engine! You'll need to define the functions you use in you game code and also you'll need to derive some of the #defines from the libcurl source code because they're defined via a macro.
Here is the header file I've prepared to use libcurl in our game code:
http://pastebin.com/n9m8mqag