title: How to to build C++ code into both .so and .dll
body: <p>I am trying to find a way where I can build C/C++ code into both .dll and .so when needed. Either through Visual Studio, CMake or any other tool. I need to also need to reference third party libraries depending on which extension I'm building.</p>
  
  <p>I have tried looking into CMake but it seems to build the respective extension type to your Operating System, so since I'm using Windows it seems to only build .dll and not .so.</p>
  
  <p>I don't think Visual Studio can switch easily between the two especially referencing the third party .dll or .so respectively. I haven't looked at Eclipse yet. </p>
  
  <p>What I am trying to do is to build a C/C++ library to be used on Android phones (which uses .so files) but I would like to test my C/C++ code my Windows PC as a sort of unit test before deploying onto the phone. </p>
  
  <p>Any suggestions?</p>