Detect target platform.

I have a well established code based written using VS.2013. I am exploring the merits of forking some of this code and make it platform independent.

Currently the code actually compiles perfectly in Rider...but it doesn't run. It doesn't run because there are some calls very specific to the Windows environment where everything was created.

What I want to do is amend the codebase and refactor out the offending code...but I need to be able to detect which platform I'm compiling on. In days gone by we might have had an #if WINDOWS... #endif or similar. 

Is there anything like that here? I have not been able to find it.



Please sign in to leave a comment.