Have you tried cross platform design writing, for example:
robot.h
namespace robot {
struct private_data;
class API robot {
public:
void doSomething();
private:
private_data* p;
};
}
robot.cpp
#include <vertex.h>
namespace robot {
struct private_data {
map::example::Vertex* v;
// etc.
};
}
void robot::doSomething() {
private_data.v-> ...;
}
This was all private data is hidden from users of robot::robot, and only the actual implementation understands what the private_data is.
In addition, now you can have win32_robot.cpp, and linux_robot.cpp each with their own definition of private_data.
Last thing, about a simple interface to bind is usually done by declaring the function pointers and loading the dll's you are interested in manually.
Like,
#define GAME_UPDATE_AND_RENDER(name) void name(GameMemory* gameMemory, user_input::GameInput* input, float frameTime)
typedef GAME_UPDATE_AND_RENDER(Game_UpdateAndRender);
HMODULE hMdl = LoadLibraryA(TempDLLName);
Game_UpdateAndRender* UpdateAndRender;
if (hMdl) {
UpdateAndRender = (Game_UpdateAndRender *) GetProcAddress(hMdl, "GameUpdateAndRender");
}
// or for OpenGl
typedef void WINAPI gl_uniform_matrix_4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
gl_uniform_matrix_4fv *glUniformMatrix4fv;
glUniformMatrix4fv = (gl_uniform_matrix_4fv *)wglGetProcAddress("glUniformMatrix4fv");