fixed precedence error
fixed MSVC++ compiler error
changed order for __declspec(dllexport)