I need some help on writing cross-platform code; not an application, but a library.
I am creating a library both static and dynamic with most of the development done
You can pretty easily do it with #ifdef's. On Windows _WIN32 should be defined by the compiler (even for 64 bit), so code like
#ifdef _WIN32 # define EXPORTIT __declspec( dllexport ) #else # define EXPORTIT #endif EXPORTIT int somefunction();
should work OK for you.