Issues porting from linux to windows (winapi?)

So I typically program on linux, however I wish to release this application on multiple platforms and as such I'm testing the main framework on windows (works on various flavors of linux so far), it's more or less coming along well... except for everything that depends on the windows API.

one of the many things I want to accomplish is to load .dll files from a subdirectory as to not clog up the main directory (and to allow overriding various plugins and whatnot with user defined versions by proxy of load order without overwriting anything or moving anything), a quick google search informed me that I had to use the WINAPI function LoadLibrary(), easy enough I guess, here's the offending code in question.

#ifdef _WIN32
#define WINVER 0x0600 //I use C++11, I don't know if that's available on winXP, I don't care either... I'll just define vista as a minimum requirement.
#include <windows.h>
LoadLibrary("Win32-bin\\Irrlicht.dll");
#endif //_WIN32
//That block is actually two blocks contracted to one, in reality I actually include the header and define the WINVER first, then in a second ifdef block I load the dll

That just outputs a few compilation errors (see paste below)
http://pastebin.com/06rgBeG1
Given the errors I'd assume the headers were written by monkeys, either that or I'm using the function wrong (I wouldn't know, I'm not a windows programmer).

I would compile it through a command line except that does not seem like my idea of fun, the project is very large and I'm not about to write a makefile just to compile with mingw, setting up the netbeans project the way I want it works well enough.

However some test code (nicked from this very forum, not about to locate that post again) for windows headers did work
Here it is:

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow)
{
MessageBox(NULL, "OK So this is working!", "Msg LOL", MB_OK);
return 0;
}

So I know that I can at least use some of the windows api without it exploding.
mingw version 4.8.1
Topic archived. No new replies allowed.